From cfa6a49978c1bf52ec3d9295c2915289c9b3d985 Mon Sep 17 00:00:00 2001 From: John Lees Date: Mon, 6 Jan 2025 17:20:55 +0000 Subject: [PATCH] Remove the mismatched version warning (#97) * Remove the mismatched version warning * Add setuptools to requirements * Two attempts at nvcc CI * Two fix attempts * Try newer cuda version * Replace hardcoded CUDA path in Makefile * Unpin cuda in environment.yaml * Remove CUDA_HOME export in workflow * Still seem to need explicit CUDA_HOME in with 12.6 Goes in azure config which is better at least --- .github/workflows/azure_ci.yml | 2 +- azure-pipelines.yml | 14 ++++++-------- environment.yml | 3 ++- requirements.txt | 1 + src/Makefile | 2 +- src/sketchlib_bindings.cpp | 5 ----- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/azure_ci.yml b/.github/workflows/azure_ci.yml index 97771e8a..77d7a68d 100644 --- a/.github/workflows/azure_ci.yml +++ b/.github/workflows/azure_ci.yml @@ -3,7 +3,7 @@ # Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/python -name: Run tests +name: Run tests (CPU) on: [push] diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 876e32b2..600dd095 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,7 +4,7 @@ trigger: - master pool: - vmImage: 'ubuntu-20.04' + vmImage: 'ubuntu-22.04' strategy: matrix: Python38: @@ -24,12 +24,10 @@ steps: displayName: Add conda to PATH - script: | - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin - sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 - sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub - sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" + wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + sudo dpkg -i cuda-keyring_1.1-1_all.deb sudo apt-get update - sudo apt-get -y install cuda=11.2.2-1 + sudo apt-get -y install cuda-toolkit displayName: Install nvcc - bash: conda env create --file environment.yml @@ -39,7 +37,7 @@ steps: # pushd src && make && make install && popd - script: | source activate pp_env - export CUDA_HOME=/usr/local/cuda-11.2 + export CUDA_HOME=/usr/local/cuda-12.6 export PATH=${CUDA_HOME}/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=${CUDA_HOME}/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} export SKETCHLIB_INSTALL=azure @@ -48,7 +46,7 @@ steps: - script: | source activate pp_env - export CUDA_HOME=/usr/local/cuda-11.2 + export CUDA_HOME=/usr/local/cuda-12.6 export PATH=${CUDA_HOME}/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=${CUDA_HOME}/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} cd test && python run_test.py diff --git a/environment.yml b/environment.yml index 13fb63cb..5b51c4fc 100644 --- a/environment.yml +++ b/environment.yml @@ -7,6 +7,7 @@ channels: dependencies: - python - pip + - setuptools - numpy - scipy - docopt @@ -21,4 +22,4 @@ dependencies: - openblas - libgfortran-ng - nvcc_linux-64 - - cudatoolkit==11.2 # This is pinned due to version install on azure, see azure-pipelines.yml + - cudatoolkit # This is pinned due to version install on azure, see azure-pipelines.yml diff --git a/requirements.txt b/requirements.txt index 398ec6ce..edb9e7c5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ numpy pybind11 scipy docopt +setuptools diff --git a/src/Makefile b/src/Makefile index feac46ba..00719ef2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -34,7 +34,7 @@ CUDAFLAGS +=-std=c++17 -Xcompiler -fPIC --cudart static --relocatable-device-cod ifdef GPU CXXFLAGS += -DGPU_AVAILABLE CUDAFLAGS += -gencode arch=compute_86,code=sm_86 - CUDA_LDFLAGS += -L/usr/local/cuda-11.2/lib64 + CUDA_LDFLAGS += -L${CUDA_HOME}/lib64 endif PYTHON_LIB = pp_sketchlib$(shell python3-config --extension-suffix) diff --git a/src/sketchlib_bindings.cpp b/src/sketchlib_bindings.cpp index c323442e..435b2f25 100644 --- a/src/sketchlib_bindings.cpp +++ b/src/sketchlib_bindings.cpp @@ -99,11 +99,6 @@ NumpyMatrix queryDatabase(const std::string &ref_db_name, throw std::runtime_error( "Extracting Jaccard distances not supported on GPU"); } - if (!same_db_version(ref_db_name, query_db_name)) { - std::cerr << "WARNING: versions of input databases sketches are different," - " results may not be compatible" - << std::endl; - } std::vector ref_sketches = load_sketches(ref_db_name, ref_names, kmer_lengths, false);