Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 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
9f484f0
Update coverage.yml
sunliang98 Nov 11, 2025
138a17e
Update coverage.yml
sunliang98 Nov 11, 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
94 changes: 85 additions & 9 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:
branches:
- develop
workflow_dispatch:
push:
tags:
Expand All @@ -13,24 +16,97 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install Requirements for Coverage Testing
with:
submodules: recursive

- name: Install Perl Dependencies and Coverage Tools
run: |
apt update && apt install -y lcov gpg curl jq ca-certificates
- name: Building
apt update && apt install -y curl jq ca-certificates python3-pip
# 首先安装系统版本的 lcov 和 Perl 依赖
apt install -y lcov perl-modules
# 安装必要的 Perl 模块
apt install -y libcapture-tiny-perl libdatetime-perl libjson-perl libperlio-gzip-perl
# 验证系统 lcov 是否工作
lcov --version
# 同时安装 gcovr 作为备用方案
pip3 install gcovr

- name: Building with Coverage
run: |
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
rm -rf build/
rm -f CMakeCache.txt
# 确保构建目录权限
mkdir -p build
chmod -R 755 build/
# 使用明确的覆盖率标志
cmake -B build \
-DENABLE_COVERAGE=ON \
-DBUILD_TESTING=ON \
-DENABLE_MLALGO=ON \
-DENABLE_LIBXC=ON \
-DENABLE_LIBRI=ON \
-DENABLE_GOOGLEBENCH=ON \
-DENABLE_RAPIDJSON=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="--coverage -fprofile-arcs -ftest-coverage" \
-DCMAKE_EXE_LINKER_FLAGS="--coverage"
cmake --build build -j`nproc` || echo "Some tests failed but continuing for coverage"
cmake --install build || echo "Some tests failed but continuing for coverage"

- name: Testing
env:
OMP_NUM_THREADS: 1
run: |
cmake --build build --target test ARGS="-V --timeout 21600" || exit 0
# 运行测试前确保权限
chmod -R 755 build/
cmake --build build --target test ARGS="-V --timeout 21600" || echo "Some tests failed but continuing for coverage"

- name: Generate Coverage Data
run: |
cd build
# 检查 .gcno 和 .gcda 文件是否存在
echo "Checking for coverage files:"
find . -name "*.gcno" | head -10
find . -name "*.gcda" | head -10

# 方法1: 使用更新后的 lcov
echo "Generating coverage with lcov..."
lcov --directory . --capture --output-file coverage.info || echo "lcov failed, will try gcovr"

# 过滤覆盖率数据
lcov --remove coverage.info '/usr/*' '*/test/*' '*/external/*' '*/build/*' --output-file coverage.filtered.info || echo "lcov filtering failed"

# 生成HTML报告用于检查
genhtml coverage.filtered.info --output-directory coverage-report || echo "genhtml failed"

# # 方法2: 使用 gcovr 作为备用
# echo "Generating coverage with gcovr..."
# gcovr -r .. --html --html-details -o coverage-gcovr.html --print-summary || echo "gcovr failed"

# # 同时生成 gcovr 的 XML 格式,Codecov 更喜欢这种格式
# gcovr -r .. --xml -o coverage.xml || echo "gcovr xml failed"

cd ..

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v5
if: ${{ ! cancelled() }}
with:
fail_ci_if_error: true
fail_ci_if_error: false # 设置为 false 避免因覆盖率收集失败而整个 CI 失败
token: ${{ secrets.CODECOV_TOKEN }}
skip_validation: true
files: ./build/coverage.xml,./build/coverage.info # 提供多个文件选项
directory: ./build/
flags: unittests
name: codecov-umbrella
verbose: true

- name: Upload Coverage Report Artifact
uses: actions/upload-artifact@v4
if: always() # 即使前面的步骤失败也上传,便于调试
with:
name: coverage-report
path: |
build/coverage-report/
build/coverage.info
build/coverage.xml
retention-days: 30
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()
Loading