Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
a02d678
Test: Modify FindMKL.cmake
sunliang98 Oct 28, 2025
04bc224
Fix: Add condition to login to Aliyun Registry only for non-forked PRs
sunliang98 Oct 28, 2025
b8b78ef
Update Dockerfile: streamline oneAPI installation and improve environ…
sunliang98 Oct 28, 2025
a393a72
Fix: Add gzip installation to Dockerfile for build tools
sunliang98 Oct 28, 2025
a81705f
Update Dockerfile.intel
sunliang98 Oct 28, 2025
e6f7eff
Fix: Update ELPA version to 2022.11.001 in Dockerfile
sunliang98 Oct 28, 2025
d3cc27c
Fix: Refactor Dockerfile.intel to streamline package installation and…
sunliang98 Oct 29, 2025
7c6465c
Fix: Update ELPA build process in Dockerfile.intel to improve extract…
sunliang98 Oct 29, 2025
4479db1
Fix: Update ELPA extraction method in Dockerfile.intel to use gzip an…
sunliang98 Oct 29, 2025
eeb7e60
Fix: Correct file removal command in ELPA build process in Dockerfile…
sunliang98 Oct 29, 2025
fd422d6
Fix: Comment out LIBRARY_PATH and CC/CXX/FC environment variables in …
sunliang98 Oct 29, 2025
296046a
Fix: Update Dockerfile.intel to include pkg-config and kernel headers…
sunliang98 Oct 29, 2025
4c9d946
Fix: Correct environment variable assignments for compiler in Dockerf…
sunliang98 Oct 29, 2025
e31d91a
Fix: Update Dockerfile.intel to streamline oneAPI installation and im…
sunliang98 Oct 29, 2025
47c555d
Fix: Update compiler settings in Dockerfile.intel to use mpiicx for b…
sunliang98 Oct 29, 2025
727b9ec
Fix: Remove output redirection from oneAPI environment setup in Docke…
sunliang98 Oct 30, 2025
d6368ba
Fix: Update Dockerfile.intel to enhance build command with error hand…
sunliang98 Oct 30, 2025
7fe731f
Fix: Uncomment find_package for MKL to enable proper detection of MKL…
sunliang98 Oct 30, 2025
f4cfdf8
Fix: Update CMake configuration in Dockerfile.intel to disable SYCL s…
sunliang98 Oct 30, 2025
e6cf315
Fix: Update abacus build process in Dockerfile.intel to set missing e…
sunliang98 Oct 30, 2025
825ed00
Fix: Remove unnecessary environment variable settings before cloning …
sunliang98 Oct 30, 2025
38d1b06
Fix: Comment out find_package for MKL to prevent conflicts with modul…
sunliang98 Oct 30, 2025
6b31fe2
Enhance Dockerfile with libraries installation: PEXSI and its DEPs
ZhouXY-PKU Nov 3, 2025
b8fcb70
Delete some #s to avoid errors
ZhouXY-PKU Nov 3, 2025
da23327
Fix Dockerfile to ensure .so files are copied correctly
ZhouXY-PKU Nov 3, 2025
2171daf
Refactor Dockerfile to simplify build commands: No icc now
ZhouXY-PKU Nov 3, 2025
98fc4f4
Remove copying of .so files in Dockerfile
ZhouXY-PKU Nov 3, 2025
f135a01
Update Dockerfile to include library path exports
ZhouXY-PKU Nov 3, 2025
c3f0e47
Update Dockerfile.intel
sunliang98 Nov 3, 2025
ed44e78
Update Dockerfile.intel
sunliang98 Nov 3, 2025
ac64756
Modify FindMKL.cmake to add support for finding and importing the MKL…
sunliang98 Nov 3, 2025
b7ecb82
Turn off PEXSI
sunliang98 Nov 3, 2025
12d3478
Update FindMKL.cmake and CMakeLists.txt
sunliang98 Nov 3, 2025
350a78e
Update Dockerfile.intel
ZhouXY-PKU Nov 3, 2025
1df9d53
Update ABACUS version check path in Dockerfile
ZhouXY-PKU Nov 3, 2025
d37f51d
Update library paths in Dockerfile.intel
ZhouXY-PKU Nov 4, 2025
6cbc62a
Uncomment PEXSI installation steps in Dockerfile
ZhouXY-PKU Nov 4, 2025
e9f4086
Change Fortran compiler from mpif90 to mpiifort
ZhouXY-PKU Nov 4, 2025
8947be1
source setvar.sh
ZhouXY-PKU Nov 4, 2025
0ed15af
Update Dockerfile to install SuperLU_DIST
ZhouXY-PKU Nov 4, 2025
221cd56
Update Dockerfile.intel
ZhouXY-PKU Nov 4, 2025
05bd604
Update Fortran compiler from mpiifort to mpiifx
ZhouXY-PKU Nov 4, 2025
d9108e2
Fix library paths and RUN command in Dockerfile.intel
ZhouXY-PKU Nov 5, 2025
c49741f
Update PEXSI download link and cleanup commands
ZhouXY-PKU Nov 5, 2025
d2fc1e8
Fix download and extraction commands for PEXSI
ZhouXY-PKU Nov 5, 2025
67a7d2e
Add PEXSI installation to Dockerfile.intel
ZhouXY-PKU Nov 5, 2025
a8a3d73
Fix METIS_INCLUDE_DIRS to METIS_INCLUDE_DIR
ZhouXY-PKU Nov 5, 2025
cd4984f
Refactor CMake arguments in Dockerfile.intel
ZhouXY-PKU Nov 5, 2025
b141e1a
Add CMAKE_PREFIX_PATH
ZhouXY-PKU Nov 5, 2025
08317d3
Fix Dockerfile for Intel oneAPI and PEXSI build
ZhouXY-PKU Nov 5, 2025
1eecf23
Update Dockerfile.intel
ZhouXY-PKU Nov 5, 2025
aa3fa47
Comment out add_executable in pexsi CMake files
ZhouXY-PKU Nov 5, 2025
2438862
Disable Fortran support in Dockerfile.intel
ZhouXY-PKU Nov 6, 2025
c9cefbd
Modify CMakeLists to comment out example executables
ZhouXY-PKU Nov 6, 2025
b2bdcd6
Change abacus-develop retrieval method in Dockerfile
ZhouXY-PKU Nov 6, 2025
a7c2245
Add include directive in edm.cpp for LCAO
ZhouXY-PKU Nov 6, 2025
9505834
Update elecstate_lcao.cpp
ZhouXY-PKU Nov 6, 2025
14a6983
Update elecstate_lcao.h
ZhouXY-PKU Nov 6, 2025
ee92dac
Update Dockerfile.intel
ZhouXY-PKU Nov 6, 2025
2cf0a8d
Update elecstate_lcao.cpp
ZhouXY-PKU Nov 7, 2025
899bc92
Update elecstate_lcao.h
ZhouXY-PKU Nov 7, 2025
f429bcb
Merge branch 'develop' into container_test
ZhouXY-PKU Nov 7, 2025
c13df5a
Update Dockerfile.intel
ZhouXY-PKU Nov 7, 2025
e6a4e1f
Merge branch 'develop' into container_test
ZhouXY-PKU Nov 7, 2025
d095f2f
Update Dockerfile.intel
ZhouXY-PKU Nov 7, 2025
4983b0d
Update Dockerfile.intel
ZhouXY-PKU Nov 7, 2025
fbfa87e
Update devcontainer.yml
ZhouXY-PKU Nov 9, 2025
924e48e
Update coverage.yml
ZhouXY-PKU Nov 9, 2025
cafd6fa
Update CMakeLists.txt
ZhouXY-PKU Nov 9, 2025
31d8de8
Update coverage.yml
ZhouXY-PKU Nov 9, 2025
b1f0f68
Update CMakeLists.txt
ZhouXY-PKU Nov 9, 2025
a49b42f
Update CMakeLists.txt
ZhouXY-PKU Nov 9, 2025
e77fafb
Update CMakeLists.txt
ZhouXY-PKU Nov 9, 2025
c910946
Update coverage.yml
ZhouXY-PKU Nov 9, 2025
8832d99
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
25b1769
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
273839c
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
8d12b64
Create Findcodecov.cmake
ZhouXY-PKU Nov 10, 2025
27f4dfc
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
05842bb
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
bd30a0a
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
feab2b0
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
7fe7142
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
52d24d7
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
fd27fb3
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
50284f6
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
ab10775
Update coverage.yml
ZhouXY-PKU Nov 10, 2025
df1329a
Update CMakeLists.txt
ZhouXY-PKU Nov 10, 2025
d725754
Create FindLcov.cmake
ZhouXY-PKU Nov 10, 2025
d5b3fde
Create FindGcov.cmake
ZhouXY-PKU Nov 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_test_cmake.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build Test
on:
push:
pull_request:
# pull_request:

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_test_makefile.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build Test
on:
push:
pull_request:
# pull_request:

jobs:
test:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Coverage Analysis

on:
pull_request: # 当有 PR 指向 develop 分支时触发
branches:
- develop
workflow_dispatch:
push:
tags:
Expand All @@ -16,8 +19,12 @@ jobs:
- name: Install Requirements for Coverage Testing
run: |
apt update && apt install -y lcov gpg curl jq ca-certificates
# mkdir externals
# git submodule add git://github.com/RWTH-HPC/CMake-codecov.git externals/CMake-codecov
- name: Building
run: |
rm -rf build/
rm -f CMakeCache.txt
cmake -B build -DENABLE_COVERAGE=ON -DBUILD_TESTING=ON -DENABLE_MLALGO=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON
cmake --build build -j`nproc`
cmake --install build
Expand All @@ -26,6 +33,9 @@ jobs:
OMP_NUM_THREADS: 1
run: |
cmake --build build --target test ARGS="-V --timeout 21600" || exit 0
- name: Generate Coverage Report
run: |
cmake --build build --target coverage
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v5
if: ${{ ! cancelled() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CUDA Test

on:
workflow_dispatch:
pull_request:
# pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Container

on:
#pull_request: # 当有 PR 指向 develop 分支时触发
#branches:
# - develop
push:
branches:
- develop
Expand All @@ -14,7 +17,8 @@ jobs:
if: github.repository_owner == 'deepmodeling'
strategy:
matrix:
dockerfile: ["gnu","intel","cuda"]
dockerfile: ["intel"]
# dockerfile: ["gnu","intel","cuda"]
steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -41,10 +45,11 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Aliyun Registry
# 只有在不是由 fork 的 PR 触发时才执行
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
# AliCloud automatically mirrors to registry.dp.tech
username: ${{ secrets.DP_HARBOR_USERNAME }}
password: ${{ secrets.DP_HARBOR_PASSWORD }}

Expand All @@ -54,6 +59,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: Dockerfile.${{ matrix.dockerfile }}
push: true
# 只有在 develop 分支或打标签时才推送,PR时不推送
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=registry,ref=ghcr.io/deepmodeling/abacus-${{ matrix.dockerfile }}:latest
cache-to: type=inline
3 changes: 2 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Pyabacus Build and Test

on:
pull_request:
push:
# pull_request:

jobs:
test:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Integration Test and Unit Test

on:
pull_request:
push:
# pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
27 changes: 24 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,24 @@ endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

if(ENABLE_COVERAGE)
find_package(codecov)
find_package(codecov QUIET)
if(NOT codecov_FOUND)
include(FetchContent)
FetchContent_Declare(
cmakecodecov
URL https://github.com/baixiaokuang/CMake-codecov/archive/refs/heads/master.zip
GIT_REPOSITORY https://github.com/RWTH-HPC/CMake-codecov.git
GIT_TAG master
# URL https://github.com/baixiaokuang/CMake-codecov/archive/refs/heads/master.zip
# URL https://github.com/RWTH-HPC/CMake-codecov/archive/refs/heads/master.zip
# URL https://gitee.com/mirrors_rwth-elp/cmake-codecov/archive/refs/heads/master.zip
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
FetchContent_Populate(cmakecodecov)
list(APPEND CMAKE_MODULE_PATH ${cmakecodecov_SOURCE_DIR}/cmake)
set(CMAKE_MODULE_PATH "${cmakecodecov_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
find_package(codecov REQUIRED)
##set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/externals/CMake-codecov/cmake" ${CMAKE_MODULE_PATH})
endif()
endif()

Expand Down Expand Up @@ -806,5 +814,18 @@ install(PROGRAMS ${ABACUS_BIN_PATH}
)

if(ENABLE_COVERAGE)
coverage_evaluate()
## coverage_evaluate()
add_custom_target(coverage
COMMAND ${CMAKE_COMMAND} -E echo "Capturing coverage data..."
COMMAND lcov --capture --directory ${CMAKE_BINARY_DIR} --output-file ${CMAKE_BINARY_DIR}/coverage.info
COMMAND ${CMAKE_COMMAND} -E echo "Filtering coverage data..."

COMMAND lcov --remove ${CMAKE_BINARY_DIR}/coverage.info '/usr/*' '*/test/*' '*/gtest/*' '*/gmock/*' --output-file ${CMAKE_BINARY_DIR}/coverage.info
COMMAND ${CMAKE_COMMAND} -E echo "Generating HTML report..."

COMMAND genhtml -o ${CMAKE_BINARY_DIR}/coverage_html ${CMAKE_BINARY_DIR}/coverage.info
COMMAND ${CMAKE_COMMAND} -E echo "Coverage report generated at: ${CMAKE_BINARY_DIR}/coverage_html/index.html"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Generating code coverage report with lcov"
)
endif()
121 changes: 114 additions & 7 deletions Dockerfile.intel
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Base image
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 \
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 .
# Add Intel apt repo
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
| sudo tee /etc/apt/sources.list.d/oneAPI.list

# To save disk space, only install the essential components, but not the whole toolkit.
# 安装oneAPI组件(使用更灵活的版本处理)
RUN apt-get update && \
apt-get install -y \
intel-oneapi-compiler-dpcpp-cpp \
Expand Down Expand Up @@ -44,18 +45,121 @@ ENV PKG_CONFIG_PATH=${MKLROOT}/lib/pkgconfig:${ONEAPI_ROOT}/mpi/latest/lib/pkgco
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=mpiicc CXX=mpiicpc FC=mpiifort
# 备用设置(如果上面的不行)
ENV CC=mpiicx CXX=mpiicpx FC=mpiifx

# Verify oneAPI installation
# 验证oneAPI安装
RUN source ${ONEAPI_ROOT}/setvars.sh && \
echo "=== Verify compiler ===" && \
echo "=== 验证编译器 ===" && \
which mpiicx && mpiicx --version && \
echo "=== Verify MKL ===" && \
echo "=== 验证MKL ===" && \
ls ${MKLROOT}/lib/intel64/ && \
echo "=== Verify MPI ===" && \
echo "=== 验证MPI ===" && \
which mpirun && mpirun --version

# https://elpa.mpcdf.mpg.de/software/tarball-archive/ELPA_TARBALL_ARCHIVE.html
###### PEXSI PART: pexsi and gklib and metis and parmetis and superlu_dist
ENV GKLIB_VERSION="master"
ENV METIS_VERSION="master"
ENV PARMETIS_VERSION="main"
ENV SUPERLU_DIST_VERSION=7.2.0
ENV PEXSI_VERSION=2.0.0
ENV GKLIB_ROOT=/usr/local/gklib-${GKLIB_VERSION}
ENV METIS32_ROOT=/usr/local/metis32-${METIS_VERSION}
ENV PARMETIS32_ROOT=/usr/local/parmetis32-${PARMETIS_VERSION}
ENV PEXSI32_ROOT=/usr/local/pexsi32-${PEXSI_VERSION}
ENV SUPERLU_DIST32_ROOT=/usr/local/superlu_dist32-${SUPERLU_DIST_VERSION}

# 2. install GKlib
RUN wget https://codeload.github.com/KarypisLab/GKlib/zip/refs/heads/${GKLIB_VERSION} -O GKlib-${GKLIB_VERSION}.zip && \
unzip GKlib-${GKLIB_VERSION}.zip && \
cd GKlib-${GKLIB_VERSION} && \
make config shared=1 prefix=${GKLIB_ROOT} openmp=set && \
make -j$(nproc) && \
make install && \
ls ${GKLIB_ROOT}/lib && \
cp ${GKLIB_ROOT}/lib/libGKlib.so.0 ${GKLIB_ROOT}/lib/libGKlib.so && \
cd / && rm -rf GKlib-${GKLIB_VERSION} GKlib-${GKLIB_VERSION}.zip
#.so file CANNOT be found otherwise.
# 2. install METIS
RUN export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${LD_LIBRARY_PATH} && \
wget https://codeload.github.com/KarypisLab/METIS/zip/refs/heads/${METIS_VERSION} -O METIS-${METIS_VERSION}.zip && \
unzip METIS-${METIS_VERSION}.zip && \
cd METIS-${METIS_VERSION} && \
make config shared=1 prefix=${METIS32_ROOT} gklib_path=${GKLIB_ROOT} && \
make -j$(nproc) && \
make install && \
cd / && rm -rf METIS-${METIS_VERSION} METIS-${METIS_VERSION}.zip

# 3. install ParMETIS
RUN export LD_LIBRARY_PATH=${METIS32_ROOT}/lib:${GKLIB_ROOT}/lib:${LD_LIBRARY_PATH} && \
wget https://codeload.github.com/KarypisLab/ParMETIS/zip/refs/heads/${PARMETIS_VERSION} -O ParMETIS-${PARMETIS_VERSION}.zip && \
unzip ParMETIS-${PARMETIS_VERSION}.zip && \
cd ParMETIS-${PARMETIS_VERSION} && \
make config shared=1 prefix=${PARMETIS32_ROOT} gklib_path=${GKLIB_ROOT} metis_path=${METIS32_ROOT} && \
make -j$(nproc) && \
make install && \
cd / && rm -rf ParMETIS-${PARMETIS_VERSION} ParMETIS-${PARMETIS_VERSION}.zip

# 4. install SuperLU_DIST
RUN wget https://codeload.github.com/xiaoyeli/superlu_dist/tar.gz/refs/tags/v${SUPERLU_DIST_VERSION} -O v${SUPERLU_DIST_VERSION}.tar.gz && \
tar -xzf v${SUPERLU_DIST_VERSION}.tar.gz && \
cd superlu_dist-${SUPERLU_DIST_VERSION} && \
mkdir build && cd build && \
cmake .. \
-DTPL_ENABLE_PARMETISLIB=ON \
-DTPL_PARMETIS_LIBRARIES="${PARMETIS32_ROOT}/lib/libparmetis.so;${METIS32_ROOT}/lib/libmetis.so;${GKLIB_ROOT}/lib/libGKlib.so" \
-DTPL_PARMETIS_INCLUDE_DIRS="${PARMETIS32_ROOT}/include;${METIS32_ROOT}/include;${GKLIB_ROOT}/include" \
-DTPL_ENABLE_INTERNAL_BLASLIB=OFF \
-DTPL_ENABLE_LAPACKLIB=ON \
-DTPL_ENABLE_COMBBLASLIB=OFF \
-DTPL_ENABLE_CUDALIB=OFF \
-Denable_complex16=ON \
-DXSDK_INDEX_SIZE=32 \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=${SUPERLU_DIST32_ROOT} \
-DCMAKE_C_FLAGS="-O3 -fopenmp" \
-DCMAKE_CXX_FLAGS="-O3 -fopenmp" \
-DXSDK_ENABLE_Fortran=ON \
-DCMAKE_Fortran_COMPILER=mpiifx && \
make -j$(nproc) && \
make install && \
cd / && rm -rf superlu_dist-${SUPERLU_DIST_VERSION} v${SUPERLU_DIST_VERSION}.tar.gz

### -DCMAKE_C_COMPILER=mpiicc \
### -DCMAKE_CXX_COMPILER=mpiicpc \
### -DCMAKE_CUDA_COMPILER=nvcc \

# 5. install PEXSI
RUN export LD_LIBRARY_PATH=${SUPERLU_DIST32_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${GKLIB_ROOT}/lib:${LD_LIBRARY_PATH} && \
export LIBRARY_PATH=${SUPERLU_DIST32_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${GKLIB_ROOT}/lib:${LIBRARY_PATH} && \
export PKG_CONFIG_PATH=${SUPERLU_DIST32_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${GKLIB_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH} && \
export CPATH=${SUPERLU_DIST32_ROOT}/include:${PARMETIS32_ROOT}/include:${METIS32_ROOT}/include:${GKLIB_ROOT}/include:${CMAKE_PREFIX_PATH} && \
export CMAKE_PREFIX_PATH=${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH} && \
wget https://bitbucket.org/berkeleylab/pexsi/downloads/pexsi_v${PEXSI_VERSION}.tar.gz && \
tar -xzf pexsi_v${PEXSI_VERSION}.tar.gz && \
cd pexsi_v${PEXSI_VERSION} && \
sed -i 's/^add_pexsi_f_example_exe/# add_pexsi_f_example_exe/g' fortran/CMakeLists.txt && \
sed -i 's/^add_pexsi_example_exe/# add_pexsi_example_exe/g' examples/CMakeLists.txt && \
sed -i 's/add_executable/# add_executable/g' fortran/CMakeLists.txt && \
sed -i 's/add_executable/# add_executable/g' examples/CMakeLists.txt && \
mkdir build && cd build && \
cmake .. \
-DCMAKE_INSTALL_PREFIX=${PEXSI32_ROOT} \
-DPEXSI_ENABLE_OPENMP=ON \
-DPEXSI_ENABLE_FORTRAN=OFF && \
make pexsi -j$(nproc) && \
make install && \
cd / && rm -rf pexsi_v${PEXSI_VERSION} pexsi_v${PEXSI_VERSION}.tar.gz

### -DCMAKE_C_COMPILER=mpiicc \
### -DCMAKE_CXX_COMPILER=mpiicpc \
###### END of PEXSI PART


# Build ELPA (example dependency)
RUN source /opt/intel/oneapi/setvars.sh && \
cd /tmp && \
ELPA_VER=2022.11.001 && \
Expand All @@ -77,13 +181,16 @@ 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 export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU32_DIST_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH} && \
export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU32_DIST_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH} && \
export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU32_DIST_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH} && \
export CMAKE_PREFIX_PATH=${PEXSI32_ROOT}:${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH} && \
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_PEXSI=ON \
-DENABLE_RAPIDJSON=ON \
-DCMAKE_BUILD_TYPE=Release && \
cmake --build build -j"$(nproc)" && \
Expand Down
Loading
Loading