diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e8193192e..f650c8a2a 100755 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -2,7 +2,7 @@ name: CMake on: push: - branches: [ main ] + branches: [ main, fix-mkl ] pull_request: branches: [ main ] diff --git a/.gitmodules b/.gitmodules index 617359b69..0d712dc06 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,3 +14,7 @@ path = IP-DiskANN url = https://github.com/intellistream/IP-DiskANN.git branch = main +[submodule "PLSH"] + path = PLSH + url = https://github.com/Kwan-Yiu/PLSH.git + branch = master \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ad2e9006..875ca8e88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,8 +370,14 @@ target_include_directories(CANDYBENCH PUBLIC "include") #endif () # 设置 MKL 库的路径 -set(MKL_INCLUDE_DIR "/opt/intel/oneapi/mkl/2025.2/include") -set(MKL_LIB_DIR "/opt/intel/oneapi/mkl/2025.2/lib/intel64") +# 优先使用环境变量 MKLROOT,如果未设置则使用默认路径 +if(DEFINED ENV{MKLROOT}) + set(MKL_INCLUDE_DIR "$ENV{MKLROOT}/include") + set(MKL_LIB_DIR "$ENV{MKLROOT}/lib/intel64") +else() + set(MKL_INCLUDE_DIR "/opt/intel/oneapi/mkl/latest/include") + set(MKL_LIB_DIR "/opt/intel/oneapi/mkl/latest/lib/intel64") +endif() #set(MPI_INCLUDE_PATH "/usr/include/openmpi-x86_64") #set(MPI_LIBRARIES "/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so") diff --git a/Dockerfile b/Dockerfile index 7e9dd909c..7d14679a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,6 +51,8 @@ RUN wget -qO - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-P ENV MKLROOT=/opt/intel/oneapi/mkl/latest ENV LD_LIBRARY_PATH=${MKLROOT}/lib:${MKLROOT}/lib/intel64:${LD_LIBRARY_PATH} +ENV CPATH=${MKLROOT}/include:${CPATH} +ENV LIBRARY_PATH=${MKLROOT}/lib:${MKLROOT}/lib/intel64:${LIBRARY_PATH} RUN pip install --no-cache-dir \ @@ -85,6 +87,11 @@ RUN mkdir -p build && cd build && \ cmake .. && \ make -j && make install +WORKDIR /app/PLSH +RUN mkdir -p build && cd build && \ + cmake .. && \ + make -j && make install + WORKDIR /app/big-ann-benchmarks RUN pip install -r requirements_py3.10.txt && \ git clone https://github.com/Microsoft/DiskANN && \ diff --git a/PLSH b/PLSH new file mode 160000 index 000000000..0d033a400 --- /dev/null +++ b/PLSH @@ -0,0 +1 @@ +Subproject commit 0d033a400f9fb533dbd9fb014153f6cb151fc0c5 diff --git a/big-ann-benchmarks b/big-ann-benchmarks index 9e34ab58e..2b5075e8c 160000 --- a/big-ann-benchmarks +++ b/big-ann-benchmarks @@ -1 +1 @@ -Subproject commit 9e34ab58e9ac227a4b9d0d227567974f27089846 +Subproject commit 2b5075e8c3eaf0f88511e16634eca7fa76caeb3c