From 526a3d2a087203780aabd3274a25d2d93b4e0dea Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Tue, 4 Nov 2025 14:42:20 +0800 Subject: [PATCH 01/17] Fix: Resolve the compilation error in the Intel oneAPI 2025.3 container. --- .github/workflows/devcontainer.yml | 7 ++- Dockerfile.intel | 82 ++++++++++++++++++++---------- cmake/FindMKL.cmake | 4 +- 3 files changed, 63 insertions(+), 30 deletions(-) diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index ef9bbbfc84..50e40e7f4a 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -1,6 +1,9 @@ name: Container on: + pull_request: # FOR TESTING ONLY + branches: + - develop push: branches: - develop @@ -41,6 +44,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Login to Aliyun Registry + if: github.event.pull_request.head.repo.full_name == github.repository uses: docker/login-action@v3 with: registry: dp-harbor-registry.us-east-1.cr.aliyuncs.com @@ -54,6 +58,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} file: Dockerfile.${{ matrix.dockerfile }} - push: true + # push: true + push: ${{ github.event_name != 'pull_request' }} cache-from: type=registry,ref=ghcr.io/deepmodeling/abacus-${{ matrix.dockerfile }}:latest cache-to: type=inline diff --git a/Dockerfile.intel b/Dockerfile.intel index 5bf6308e79..3fca206116 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -2,7 +2,8 @@ FROM ubuntu:22.04 RUN apt-get update && apt-get install -y \ bc cmake git gnupg gcc g++ python3-numpy sudo wget vim unzip \ - libcereal-dev libxc-dev libgtest-dev libgmock-dev libbenchmark-dev + libcereal-dev libxc-dev libgtest-dev libgmock-dev libbenchmark-dev \ + pkg-config build-essential autoconf automake libtool # Following steps by https://software.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/installation/install-using-package-managers/apt.html . RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ @@ -16,21 +17,39 @@ RUN apt-get update && \ intel-oneapi-compiler-dpcpp-cpp \ intel-oneapi-compiler-fortran \ intel-oneapi-mkl-devel \ - intel-oneapi-mpi-devel="2021.11.*" \ + intel-oneapi-mpi-devel \ intel-oneapi-vtune && \ - rm /opt/intel/oneapi/mpi/latest && ln -s /opt/intel/oneapi/mpi/2021.11 /opt/intel/oneapi/mpi/latest -ENV I_MPI_ROOT=/opt/intel/oneapi/mpi/latest \ - LIBRARY_PATH=/opt/intel/oneapi/tbb/latest/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/latest/lib:/opt/intel/oneapi/mkl/latest/lib/:/opt/intel/oneapi/ippcp/latest/lib/:/opt/intel/oneapi/ipp/latest/lib:/opt/intel/oneapi/dpl/latest/lib:/opt/intel/oneapi/dnnl/latest/lib:/opt/intel/oneapi/dal/latest/lib:/opt/intel/oneapi/compiler/latest/lib:/opt/intel/oneapi/ccl/latest/lib/ \ - LD_LIBRARY_PATH=/opt/intel/oneapi/tbb/latest/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/latest/opt/mpi/libfabric/lib:/opt/intel/oneapi/mpi/latest/lib:/opt/intel/oneapi/mkl/latest/lib:/opt/intel/oneapi/itac/latest/slib:/opt/intel/oneapi/ippcp/latest/lib/:/opt/intel/oneapi/ipp/latest/lib:/opt/intel/oneapi/dpl/latest/lib:/opt/intel/oneapi/dnnl/latest/lib:/opt/intel/oneapi/debugger/latest/opt/debugger/lib:/opt/intel/oneapi/dal/latest/lib:/opt/intel/oneapi/compiler/latest/opt/oclfpga/host/linux64/lib:/opt/intel/oneapi/compiler/latest/opt/compiler/lib:/opt/intel/oneapi/compiler/latest/lib:/opt/intel/oneapi/ccl/latest/lib/ \ - PATH=/opt/intel/oneapi/vtune/latest/bin64:/opt/intel/oneapi/mpi/latest/opt/mpi/libfabric/bin:/opt/intel/oneapi/mpi/latest/bin:/opt/intel/oneapi/mkl/latest/bin/:/opt/intel/oneapi/itac/latest/bin:/opt/intel/oneapi/inspector/latest/bin64:/opt/intel/oneapi/dpcpp-ct/latest/bin:/opt/intel/oneapi/dev-utilities/latest/bin:/opt/intel/oneapi/debugger/latest/opt/debugger/bin:/opt/intel/oneapi/compiler/latest/opt/oclfpga/bin:/opt/intel/oneapi/compiler/latest/bin:/opt/intel/oneapi/advisor/latest/bin64:/opt/mamba/bin:/opt/mamba/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ - MKLROOT=/opt/intel/oneapi/mkl/latest \ - FI_PROVIDER_PATH=/opt/intel/oneapi/mpi/latest/opt/mpi/libfabric/lib/prov:/usr/lib/x86_64-linux-gnu/libfabric \ - CMAKE_PREFIX_PATH=/opt/intel/oneapi/tbb/latest/env/..:/opt/intel/oneapi/mkl/latest/lib/cmake:/opt/intel/oneapi/ipp/latest/lib/cmake/ipp:/opt/intel/oneapi/dpl/latest/lib/cmake/oneDPL:/opt/intel/oneapi/dnnl/latest/lib/cmake:/opt/intel/oneapi/dal/latest:/opt/intel/oneapi/compiler/latest \ - CMPLR_ROOT=/opt/intel/oneapi/compiler/latest + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Set oneAPI environment variables +ENV ONEAPI_ROOT=/opt/intel/oneapi +ENV I_MPI_ROOT=${ONEAPI_ROOT}/mpi/latest +ENV MKLROOT=${ONEAPI_ROOT}/mkl/latest +ENV CMPLR_ROOT=${ONEAPI_ROOT}/compiler/latest + +# Set library paths and include paths +ENV LIBRARY_PATH=${ONEAPI_ROOT}/tbb/latest/lib/intel64/gcc4.8:${ONEAPI_ROOT}/mpi/latest/lib:${MKLROOT}/lib/intel64:${ONEAPI_ROOT}/compiler/latest/lib/:${LIBRARY_PATH} +ENV LD_LIBRARY_PATH=${ONEAPI_ROOT}/tbb/latest/lib/intel64/gcc4.8:${ONEAPI_ROOT}/mpi/latest/lib:${MKLROOT}/lib/intel64:${ONEAPI_ROOT}/compiler/latest/lib/:${LD_LIBRARY_PATH} +ENV PATH=${ONEAPI_ROOT}/vtune/latest/bin64:${ONEAPI_ROOT}/mpi/latest/bin:${MKLROOT}/bin/intel64:${ONEAPI_ROOT}/compiler/latest/bin:${PATH} +ENV CPATH=${MKLROOT}/include:${ONEAPI_ROOT}/mpi/latest/include:${CPATH} +ENV PKG_CONFIG_PATH=${MKLROOT}/lib/pkgconfig:${ONEAPI_ROOT}/mpi/latest/lib/pkgconfig:${PKG_CONFIG_PATH} + +# Set CMAKE related paths +ENV CMAKE_PREFIX_PATH=${ONEAPI_ROOT}/tbb/latest:${MKLROOT}/lib/cmake:${ONEAPI_ROOT}/dpl/latest/lib/cmake:${ONEAPI_ROOT}/dnnl/latest/lib/cmake:${ONEAPI_ROOT}/dal/latest:${ONEAPI_ROOT}/compiler/latest:${CMAKE_PREFIX_PATH} SHELL ["/bin/bash", "-c"] ENV CC=mpiicx CXX=mpiicpx FC=mpiifx +# Verify oneAPI installation +RUN source ${ONEAPI_ROOT}/setvars.sh && \ + echo "=== Verify compiler ===" && \ + which mpiicx && mpiicx --version && \ + echo "=== Verify MKL ===" && \ + ls ${MKLROOT}/lib/intel64/ && \ + echo "=== Verify MPI ===" && \ + which mpirun && mpirun --version + # https://elpa.mpcdf.mpg.de/software/tarball-archive/ELPA_TARBALL_ARCHIVE.html RUN source /opt/intel/oneapi/setvars.sh && \ cd /tmp && \ @@ -39,28 +58,35 @@ RUN source /opt/intel/oneapi/setvars.sh && \ tar xzf elpa-$ELPA_VER.tar.gz && rm elpa-$ELPA_VER.tar.gz && \ cd elpa-$ELPA_VER && mkdir build && cd build && \ ../configure CFLAGS="-O3 -march=native" FCFLAGS="-O3 -qmkl=cluster" --enable-openmp && \ - make -j`nproc` && \ + make -j$(nproc) && \ make PREFIX=/usr/local install && \ ln -s /usr/local/include/elpa_openmp-$ELPA_VER/elpa /usr/local/include/ && \ cd /tmp && rm -rf elpa-$ELPA_VER -RUN cd /tmp && git clone https://github.com/Tencent/rapidjson.git && cp -r rapidjson/include/rapidjson /usr/include/ \ - && rm -rf rapidjson - -RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip \ - --no-check-certificate --quiet -O libtorch.zip && \ - unzip -q libtorch.zip -d /opt && rm libtorch.zip - -ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake +# rapidjson and libtorch +RUN cd /tmp && git clone --depth 1 https://github.com/Tencent/rapidjson.git && cp -r rapidjson/include/rapidjson /usr/include/ && rm -rf rapidjson +RUN wget -q https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip -O /tmp/libtorch.zip && \ + unzip -q /tmp/libtorch.zip -d /opt && rm -f /tmp/libtorch.zip +ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake:${CMAKE_PREFIX_PATH} +# Clone and build abacus (optional during image build; keep for CI image) ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/develop /dev/null - -RUN source /opt/intel/oneapi/setvars.sh && \ - git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ +RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU32_DIST_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH} && \ + export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU32_DIST_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH} && \ + cd /tmp && git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ - cmake -B build -DENABLE_MLALGO=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_RAPIDJSON=ON && \ - cmake --build build -j`nproc` && \ + cmake -B build \ + -DMKL_SYCL=OFF \ + -DENABLE_MLALGO=ON \ + -DENABLE_PEXSI=ON \ + -DENABLE_LIBXC=ON \ + -DENABLE_LIBRI=ON \ + -DENABLE_RAPIDJSON=ON \ + -DCMAKE_BUILD_TYPE=Release && \ + cmake --build build -j"$(nproc)" && \ cmake --install build && \ - rm -rf build && \ - abacus --version - #&& rm -rf abacus-develop + (/usr/local/bin/abacus --version || echo "ABACUS installed but version check failed") && \ + rm -rf /tmp/abacus-develop + +# Default entry +CMD ["/bin/bash"] \ No newline at end of file diff --git a/cmake/FindMKL.cmake b/cmake/FindMKL.cmake index f9cddfcf74..d9e3d8c921 100644 --- a/cmake/FindMKL.cmake +++ b/cmake/FindMKL.cmake @@ -70,7 +70,9 @@ if(MKL_FOUND) set_property(TARGET MKL::MKL PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--start-group" - MKL::INTEL MKL::INTEL_THREAD MKL::CORE) + MKL::INTEL MKL::INTEL_THREAD MKL::CORE + "-Wl,--end-group" + ) endif() endif() From e8ef70183832d846c46b1ee75fe6790db6f281b1 Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Tue, 4 Nov 2025 16:21:45 +0800 Subject: [PATCH 02/17] Fix: Turn off pexsi --- Dockerfile.intel | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile.intel b/Dockerfile.intel index 3fca206116..ac62c638cf 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -78,7 +78,6 @@ RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_RO cmake -B build \ -DMKL_SYCL=OFF \ -DENABLE_MLALGO=ON \ - -DENABLE_PEXSI=ON \ -DENABLE_LIBXC=ON \ -DENABLE_LIBRI=ON \ -DENABLE_RAPIDJSON=ON \ From 963197d0395611378ba07d9001d693af8f7a63fb Mon Sep 17 00:00:00 2001 From: Levi Zhou <31941107+ZhouXY-PKU@users.noreply.github.com> Date: Tue, 4 Nov 2025 17:44:09 +0800 Subject: [PATCH 03/17] Update Dockerfile for abacus-develop configuration --- Dockerfile.intel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.intel b/Dockerfile.intel index ac62c638cf..2a240e7bf1 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -76,7 +76,7 @@ RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_RO cd /tmp && git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ cmake -B build \ - -DMKL_SYCL=OFF \ + -DMKL_SYCL_DISTRIBUTED_DFT=OFF \ -DENABLE_MLALGO=ON \ -DENABLE_LIBXC=ON \ -DENABLE_LIBRI=ON \ @@ -88,4 +88,4 @@ RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_RO rm -rf /tmp/abacus-develop # Default entry -CMD ["/bin/bash"] \ No newline at end of file +CMD ["/bin/bash"] From c666a696baece27bc9898bf7b09015ae369e7d80 Mon Sep 17 00:00:00 2001 From: Levi Zhou <31941107+ZhouXY-PKU@users.noreply.github.com> Date: Tue, 4 Nov 2025 19:35:56 +0800 Subject: [PATCH 04/17] Update Dockerfile.intel --- Dockerfile.intel | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile.intel b/Dockerfile.intel index 2a240e7bf1..10d24e58fd 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -76,6 +76,8 @@ RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_RO cd /tmp && git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ cmake -B build \ + -DMKL_SYCL=OFF \ + -DMKL_SYCL_INTERFACE_FULL=OFF \ -DMKL_SYCL_DISTRIBUTED_DFT=OFF \ -DENABLE_MLALGO=ON \ -DENABLE_LIBXC=ON \ From 7589d7de6d91c4d2f324a194bb946cf678ec101a Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Tue, 4 Nov 2025 20:48:27 +0800 Subject: [PATCH 05/17] Fix: Update CMakeLists.txt --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0830d4d005..47440b5268 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -463,6 +463,7 @@ endif() if(MKLROOT) set(MKL_INTERFACE lp64) set(ENABLE_SCALAPACK ON) + set(ENABLE_SYCL_DISTRIBUTED_DFT OFF CACHE BOOL "Disable SYCL Distributed DFT for ABACUS" FORCE) find_package(MKL REQUIRED) add_definitions(-D__MKL) include_directories(${MKL_INCLUDE} ${MKL_INCLUDE}/fftw) From 6f252709cb5f8988688a8a2057d34237b3b4344a Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Wed, 5 Nov 2025 14:18:00 +0800 Subject: [PATCH 06/17] Fix: Update Dockerfile.intel and FindMKL.cmake --- Dockerfile.intel | 3 --- cmake/FindMKL.cmake | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile.intel b/Dockerfile.intel index 10d24e58fd..01e502116b 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -76,9 +76,6 @@ RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_RO cd /tmp && git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ cmake -B build \ - -DMKL_SYCL=OFF \ - -DMKL_SYCL_INTERFACE_FULL=OFF \ - -DMKL_SYCL_DISTRIBUTED_DFT=OFF \ -DENABLE_MLALGO=ON \ -DENABLE_LIBXC=ON \ -DENABLE_LIBRI=ON \ diff --git a/cmake/FindMKL.cmake b/cmake/FindMKL.cmake index d9e3d8c921..3680b8a92c 100644 --- a/cmake/FindMKL.cmake +++ b/cmake/FindMKL.cmake @@ -4,7 +4,7 @@ # MKL_INCLUDE - where to find mkl.h, etc. # MKL_FOUND - True if mkl found. -find_package(MKL NO_MODULE) # try using official module first +# find_package(MKL NO_MODULE) # try using official module first if(NOT TARGET MKL::MKL) find_path(MKL_INCLUDE mkl_service.h HINTS ${MKLROOT}/include) From 03c051dc3c04af12d35c51c2e96e7e4a3429afc9 Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Wed, 5 Nov 2025 19:39:39 +0800 Subject: [PATCH 07/17] Disable SYCL compiler detection for MKL --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47440b5268..ad3eed2f00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -463,7 +463,7 @@ endif() if(MKLROOT) set(MKL_INTERFACE lp64) set(ENABLE_SCALAPACK ON) - set(ENABLE_SYCL_DISTRIBUTED_DFT OFF CACHE BOOL "Disable SYCL Distributed DFT for ABACUS" FORCE) + set(SYCL_COMPILER OFF CACHE BOOL "Disable SYCL compiler detection for MKL" FORCE) find_package(MKL REQUIRED) add_definitions(-D__MKL) include_directories(${MKL_INCLUDE} ${MKL_INCLUDE}/fftw) From e8763c6e156e4fc8cd064622091980f716db2f65 Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Wed, 5 Nov 2025 21:17:15 +0800 Subject: [PATCH 08/17] Turn of MKL_SYCL_DISTRIBUTED_DFT --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad3eed2f00..5d541d5022 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -463,7 +463,7 @@ endif() if(MKLROOT) set(MKL_INTERFACE lp64) set(ENABLE_SCALAPACK ON) - set(SYCL_COMPILER OFF CACHE BOOL "Disable SYCL compiler detection for MKL" FORCE) + set(MKL_SYCL_DISTRIBUTED_DFT OFF CACHE BOOL "Disable SYCL distributed DFT") find_package(MKL REQUIRED) add_definitions(-D__MKL) include_directories(${MKL_INCLUDE} ${MKL_INCLUDE}/fftw) From cf2a7a28fa133d425d6101f2b515dc7f0534ca0f Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Wed, 5 Nov 2025 21:58:57 +0800 Subject: [PATCH 09/17] Test: Turn off DMKL_SYCL and DMKL_SYCL_DISTRIBUTED_DFT --- Dockerfile.intel | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile.intel b/Dockerfile.intel index 01e502116b..2da1c11baf 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -76,6 +76,8 @@ RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_RO cd /tmp && git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ cmake -B build \ + -DMKL_SYCL=OFF \ + -DMKL_SYCL_DISTRIBUTED_DFT=OFF \ -DENABLE_MLALGO=ON \ -DENABLE_LIBXC=ON \ -DENABLE_LIBRI=ON \ From 41baa12509f47febc1be6e1e7110e56e03b257d5 Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Wed, 5 Nov 2025 23:54:15 +0800 Subject: [PATCH 10/17] Update Dockerfile.intel --- Dockerfile.intel | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile.intel b/Dockerfile.intel index 2da1c11baf..a36517af6a 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -18,10 +18,14 @@ RUN apt-get update && \ intel-oneapi-compiler-fortran \ intel-oneapi-mkl-devel \ intel-oneapi-mpi-devel \ + intel-oneapi-mkl-devel-sycl \ intel-oneapi-vtune && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* +RUN ls -la /opt/intel/oneapi/mkl/latest/lib/intel64/*sycl*dft* +RUN ls -la /opt/intel/oneapi/mkl/latest/lib/intel64/*distributed* + # Set oneAPI environment variables ENV ONEAPI_ROOT=/opt/intel/oneapi ENV I_MPI_ROOT=${ONEAPI_ROOT}/mpi/latest From 14e20ef628f84b3ee7ef045d4c9a8914be36d681 Mon Sep 17 00:00:00 2001 From: Levi Zhou <31941107+ZhouXY-PKU@users.noreply.github.com> Date: Thu, 6 Nov 2025 11:48:55 +0800 Subject: [PATCH 11/17] Remove intel-oneapi-mkl-devel-sycl from Dockerfile Removed intel-oneapi-mkl-devel-sycl from installation. --- Dockerfile.intel | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile.intel b/Dockerfile.intel index a36517af6a..672ca95bc3 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -18,8 +18,9 @@ RUN apt-get update && \ intel-oneapi-compiler-fortran \ intel-oneapi-mkl-devel \ intel-oneapi-mpi-devel \ - intel-oneapi-mkl-devel-sycl \ intel-oneapi-vtune && \ + apt-cache search intel-oneapi-mkl && \ + apt-cache search intel-oneapi | grep sycl && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* From 8e67fbee0a7dc3774c141c3f2b148222cefe5951 Mon Sep 17 00:00:00 2001 From: Levi Zhou <31941107+ZhouXY-PKU@users.noreply.github.com> Date: Thu, 6 Nov 2025 12:41:13 +0800 Subject: [PATCH 12/17] Update Intel oneAPI MKL installation and cleanup --- Dockerfile.intel | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.intel b/Dockerfile.intel index 672ca95bc3..a06fce6beb 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -17,15 +17,15 @@ RUN apt-get update && \ intel-oneapi-compiler-dpcpp-cpp \ intel-oneapi-compiler-fortran \ intel-oneapi-mkl-devel \ + intel-oneapi-mkl-sycl-devel \ + intel-oneapi-mkl-sycl-distributed-dft-devel \ intel-oneapi-mpi-devel \ intel-oneapi-vtune && \ - apt-cache search intel-oneapi-mkl && \ - apt-cache search intel-oneapi | grep sycl && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* RUN ls -la /opt/intel/oneapi/mkl/latest/lib/intel64/*sycl*dft* -RUN ls -la /opt/intel/oneapi/mkl/latest/lib/intel64/*distributed* +RUN ls -la /opt/intel/oneapi/mkl/latest/lib/intel64/*dis* # Set oneAPI environment variables ENV ONEAPI_ROOT=/opt/intel/oneapi From 3ba897177abd41146215b6236c8af7860190ca43 Mon Sep 17 00:00:00 2001 From: Levi Zhou <31941107+ZhouXY-PKU@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:54:15 +0800 Subject: [PATCH 13/17] Remove SYCL distributed DFT option from MKL settings Removed the option to disable SYCL distributed DFT in MKL settings. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d541d5022..d5bdef2ccc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -463,7 +463,6 @@ endif() if(MKLROOT) set(MKL_INTERFACE lp64) set(ENABLE_SCALAPACK ON) - set(MKL_SYCL_DISTRIBUTED_DFT OFF CACHE BOOL "Disable SYCL distributed DFT") find_package(MKL REQUIRED) add_definitions(-D__MKL) include_directories(${MKL_INCLUDE} ${MKL_INCLUDE}/fftw) @@ -804,4 +803,4 @@ install(PROGRAMS ${ABACUS_BIN_PATH} if(ENABLE_COVERAGE) coverage_evaluate() -endif() \ No newline at end of file +endif() From fc2aa445cf830757b53bb0d16a29878503f29bc2 Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Thu, 6 Nov 2025 14:54:16 +0800 Subject: [PATCH 14/17] Since libmkl_sycl_distributed_dft.so can be correctly found, we try to turn on SYCL --- CMakeLists.txt | 2 +- Dockerfile.intel | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d541d5022..e0811d6ab1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -463,7 +463,7 @@ endif() if(MKLROOT) set(MKL_INTERFACE lp64) set(ENABLE_SCALAPACK ON) - set(MKL_SYCL_DISTRIBUTED_DFT OFF CACHE BOOL "Disable SYCL distributed DFT") + # set(MKL_SYCL_DISTRIBUTED_DFT OFF CACHE BOOL "Disable SYCL distributed DFT") find_package(MKL REQUIRED) add_definitions(-D__MKL) include_directories(${MKL_INCLUDE} ${MKL_INCLUDE}/fftw) diff --git a/Dockerfile.intel b/Dockerfile.intel index a06fce6beb..119cf4eb4b 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -81,8 +81,6 @@ RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_RO cd /tmp && git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ cmake -B build \ - -DMKL_SYCL=OFF \ - -DMKL_SYCL_DISTRIBUTED_DFT=OFF \ -DENABLE_MLALGO=ON \ -DENABLE_LIBXC=ON \ -DENABLE_LIBRI=ON \ @@ -92,6 +90,7 @@ RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_RO cmake --install build && \ (/usr/local/bin/abacus --version || echo "ABACUS installed but version check failed") && \ rm -rf /tmp/abacus-develop - + # -DMKL_SYCL=OFF \ + # -DMKL_SYCL_DISTRIBUTED_DFT:BOOL=OFF \ # Default entry CMD ["/bin/bash"] From f245f8ef6a0ca73d47c98c8fd6e0f0b5a4285acc Mon Sep 17 00:00:00 2001 From: Levi Zhou <31941107+ZhouXY-PKU@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:57:06 +0800 Subject: [PATCH 15/17] Update Dockerfile.intel to remove MKL_SYCL options Removed MKL_SYCL and MKL_SYCL_DISTRIBUTED_DFT options from cmake command. --- Dockerfile.intel | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile.intel b/Dockerfile.intel index a06fce6beb..3c76a2e24c 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -81,8 +81,6 @@ RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_RO cd /tmp && git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ cmake -B build \ - -DMKL_SYCL=OFF \ - -DMKL_SYCL_DISTRIBUTED_DFT=OFF \ -DENABLE_MLALGO=ON \ -DENABLE_LIBXC=ON \ -DENABLE_LIBRI=ON \ From f5aca55c6c4f53e9dfa35e2ebd1c63566d899c1a Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Thu, 6 Nov 2025 18:42:45 +0800 Subject: [PATCH 16/17] Recover devcontainer.yml, and comment out `find_package(MKL NO_MODULE)` in FindMKL.cmake. --- .github/workflows/devcontainer.yml | 3 --- cmake/FindMKL.cmake | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index 50e40e7f4a..275bc475c1 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -1,9 +1,6 @@ name: Container on: - pull_request: # FOR TESTING ONLY - branches: - - develop push: branches: - develop diff --git a/cmake/FindMKL.cmake b/cmake/FindMKL.cmake index d9e3d8c921..3680b8a92c 100644 --- a/cmake/FindMKL.cmake +++ b/cmake/FindMKL.cmake @@ -4,7 +4,7 @@ # MKL_INCLUDE - where to find mkl.h, etc. # MKL_FOUND - True if mkl found. -find_package(MKL NO_MODULE) # try using official module first +# find_package(MKL NO_MODULE) # try using official module first if(NOT TARGET MKL::MKL) find_path(MKL_INCLUDE mkl_service.h HINTS ${MKLROOT}/include) From 3bc8ee3cd84a872c83dc59bf0e74a6f2eeb1f640 Mon Sep 17 00:00:00 2001 From: sunliang98 <1700011430@pku.edu.cn> Date: Thu, 6 Nov 2025 18:45:14 +0800 Subject: [PATCH 17/17] Recover devcontainer.yml --- .github/workflows/devcontainer.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index 275bc475c1..ef9bbbfc84 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -41,7 +41,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Login to Aliyun Registry - if: github.event.pull_request.head.repo.full_name == github.repository uses: docker/login-action@v3 with: registry: dp-harbor-registry.us-east-1.cr.aliyuncs.com @@ -55,7 +54,6 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} file: Dockerfile.${{ matrix.dockerfile }} - # push: true - push: ${{ github.event_name != 'pull_request' }} + push: true cache-from: type=registry,ref=ghcr.io/deepmodeling/abacus-${{ matrix.dockerfile }}:latest cache-to: type=inline