Skip to content

Commit 2e20b5a

Browse files
Merge branch 'develop' into feat/abacuslite
2 parents 4b83167 + 69e2b1e commit 2e20b5a

260 files changed

Lines changed: 21849 additions & 8451 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: en-US
3+
4+
reviews:
5+
auto_review:
6+
enabled: true
7+
drafts: false
8+
request_changes_workflow: false
9+
high_level_summary: true
10+
poem: false
11+
path_instructions:
12+
- path: "source/**"
13+
instructions: |
14+
Apply the ABACUS agent governance rules before general style feedback.
15+
Focus on newly introduced GlobalV/GlobalC/PARAM dependencies, default
16+
parameters in headers, module placement, CMakeLists.txt linkage, C++11
17+
compatibility, and focused tests for behavior changes.
18+
- path: "source/source_io/module_parameter/**"
19+
instructions: |
20+
Treat INPUT parameter metadata, parsing, defaults, descriptions, and
21+
availability changes as user-visible behavior. Require matching updates
22+
to docs/parameters.yaml and docs/advanced/input_files/input-main.md, or
23+
a clear no-update explanation in the PR.
24+
- path: "docs/**"
25+
instructions: |
26+
Check that documentation changes match the implementation and do not
27+
weaken the rule grading matrix without an explicit rationale.
28+
- path: ".github/**"
29+
instructions: |
30+
Check workflow, PR-template, CodeRabbit, and Copilot instruction
31+
changes for consistency with AGENTS.md and
32+
docs/developers_guide/agent_governance.md.
33+
- path: "tools/03_code_analysis/**"
34+
instructions: |
35+
Review governance checker changes for false positives, missing
36+
diff-scoping, test coverage, and consistency with the GitHub Actions
37+
summary output. Prefer deterministic checks for low-noise blockers and
38+
leave semantic ownership decisions to AI and human review.
39+
40+
knowledge_base:
41+
code_guidelines:
42+
enabled: true
43+
filePatterns:
44+
- "AGENTS.md"
45+
- "docs/developers_guide/agent_governance.md"
46+
- ".github/copilot-instructions.md"
47+
- ".github/instructions/*.instructions.md"

.gitattributes

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# Shell scripts and the bash-parsed integration-test case lists must keep LF
2-
# endings so they run under bash, including MSYS2/Git-Bash on Windows where
3-
# core.autocrlf may rewrite them to CRLF (which breaks `#!/bin/bash` and adds
4-
# stray \r to parsed lines such as the case names in CASES_*.txt).
1+
# Text files use LF by default. Windows command scripts keep CRLF because
2+
# cmd.exe and installer tooling may depend on it.
3+
* text=auto eol=lf
4+
*.bat text eol=crlf
5+
*.cmd text eol=crlf
56
*.sh text eol=lf
67
CASES_*.txt text eol=lf
78

.github/copilot-instructions.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ABACUS Copilot Instructions
2+
3+
Before generating code or reviewing pull requests in this repository, follow
4+
the ABACUS development baseline in:
5+
6+
- `AGENTS.md`
7+
- `docs/developers_guide/agent_governance.md`
8+
9+
Treat `AGENTS.md` as the short entry point and
10+
`docs/developers_guide/agent_governance.md` as the complete rule source. Review
11+
the pull request diff before general style feedback, and separate blocking
12+
diff-scoped issues from historical or advisory observations.
13+
14+
Use the ABACUS review finding format for actionable findings:
15+
16+
```markdown
17+
Rule: <rule name>
18+
Severity: error | warning | info
19+
Location: <file:line>
20+
Reason: <specific trigger>
21+
Suggested action: <concrete next step>
22+
Exception: allowed | not allowed | human approval required
23+
```
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
applyTo: "**"
3+
---
4+
5+
# ABACUS Governance Review Instructions
6+
7+
Apply these instructions when reviewing or changing ABACUS code:
8+
9+
- Use `AGENTS.md` and `docs/developers_guide/agent_governance.md` as the
10+
authoritative project baseline.
11+
- Keep review scope diff-oriented: new files, diff-added lines, new includes,
12+
newly introduced symbols, and changed text files for line-ending checks.
13+
- Do not treat untouched historical debt as a default blocker. Mention it only
14+
when it affects the changed area, and label it as advisory.
15+
- Flag newly introduced `GlobalV`, `GlobalC`, or `PARAM` cross-layer control.
16+
Prefer explicit dependencies or narrow local interfaces.
17+
- Flag new default arguments in existing header interfaces. Prefer explicit
18+
call-site updates, overloads, or a clearer configuration object.
19+
- Review header include growth and `.hpp` propagation carefully. These are
20+
usually warnings unless the PR records a narrow reason.
21+
- Require LF line endings for text files. `.bat` and `.cmd` files are the CRLF
22+
exceptions.
23+
- For INPUT parameter behavior changes, require synchronized updates to
24+
`docs/parameters.yaml` and `docs/advanced/input_files/input-main.md`, or a
25+
clear no-update explanation in the PR.
26+
- Check that new source files are linked through the relevant `CMakeLists.txt`
27+
unless the PR explains generated or indirect inclusion.
28+
- Keep default C++ changes compatible with the repository C++11 baseline.
29+
- Ask for focused tests or explicit test rationale for feature changes, bug
30+
fixes, INPUT behavior changes, heterogeneous kernels, and core-module
31+
refactors.
32+
- Treat CI governance findings as deterministic evidence and semantic review
33+
findings as advisory until maintainers approve them.

.github/pull_request_template.md

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,51 @@
11
### Reminder
2-
- [ ] Have you linked an issue with this pull request?
3-
- [ ] Have you added adequate unit tests and/or case tests for your pull request?
4-
- [ ] Have you noticed possible changes of behavior below or in the linked issue?
5-
- [ ] Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)
2+
- [ ] I have read `AGENTS.md` and `docs/developers_guide/agent_governance.md`.
3+
- [ ] I have linked an issue or explained why this PR does not need one.
4+
- [ ] I have added adequate unit tests and/or case tests, or explained why not.
5+
- [ ] I have listed the exact verification commands run and their results.
6+
- [ ] I have described user-visible behavior changes, including INPUT parameter changes.
7+
- [ ] I have explained core-module impact for ESolver, HSolver, ElecState, Hamilt, Operator, Psi, or other `source/` changes.
8+
- [ ] I have requested any needed governance exception below.
69

710
### Linked Issue
811
Fix #...
912

1013
### Unit Tests and/or Case Tests for my changes
1114
- A unit test is added for each new feature or bug fix.
1215

16+
### Exact Verification Performed
17+
- Commands run:
18+
- Result summary:
19+
- Checks not run, with reason:
20+
1321
### What's changed?
1422
- Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios...
1523

16-
### Any changes of core modules? (ignore if not applicable)
17-
- Example: I have added a new virtual function in the esolver base class in order to ...
24+
### Governance Checklist
25+
- Global dependencies: no new `GlobalV`, `GlobalC`, or `PARAM` cross-layer control, or exception requested below.
26+
- Default parameters: no new default arguments added to existing interfaces, or exception requested below.
27+
- Headers: no unnecessary header dependencies or `.hpp` propagation, or rationale provided below.
28+
- Line endings: text files use LF; only `.bat` and `.cmd` use CRLF.
29+
- Build linkage: new source files are listed in the relevant `CMakeLists.txt`, or rationale provided below.
30+
- Documentation: behavior/interface changes include documentation updates, or no documentation update is required because ...
31+
- CodeRabbit: if automatic review has not started and the repository has CodeRabbit installed, request `@coderabbitai review`.
32+
33+
### INPUT Parameter Changes
34+
- Parameters added/removed/changed:
35+
- `docs/parameters.yaml` updated: yes/no/not applicable
36+
- `docs/advanced/input_files/input-main.md` updated: yes/no/not applicable
37+
- If not updated, explain why no INPUT documentation update is required:
38+
39+
### Core Module Impact
40+
- Affected core modules:
41+
- Risk summary:
42+
- Compatibility or performance impact:
43+
44+
### Governance Exception
45+
- Rule:
46+
- Reason:
47+
- Scope:
48+
- User or maintenance risk:
49+
- Why the normal rule cannot be followed now:
50+
- Follow-up cleanup plan:
51+
- Requested approver:
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Agent Governance
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited, ready_for_review]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
11+
jobs:
12+
governance:
13+
name: Governance checks
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Run ABACUS governance checker
22+
id: governance
23+
run: |
24+
set +e
25+
base_sha="${{ github.event.pull_request.base.sha }}"
26+
head_sha="${{ github.event.pull_request.head.sha }}"
27+
merge_base="$(git merge-base "$base_sha" "$head_sha")"
28+
merge_base_status=$?
29+
if [ "$merge_base_status" -ne 0 ]; then
30+
{
31+
echo "## Agent Governance Check"
32+
echo
33+
echo "Failed to compute the pull request merge base."
34+
} > agent_governance_summary.md
35+
exit "$merge_base_status"
36+
fi
37+
python3 tools/03_code_analysis/agent_governance_check.py \
38+
--base "$merge_base" \
39+
--head "$head_sha" \
40+
--event-path "$GITHUB_EVENT_PATH" \
41+
--format markdown | tee agent_governance_summary.md
42+
status=${PIPESTATUS[0]}
43+
if [ ! -s agent_governance_summary.md ]; then
44+
{
45+
echo "## Agent Governance Check"
46+
echo
47+
echo "Checker failed before producing a summary."
48+
} > agent_governance_summary.md
49+
fi
50+
exit "$status"
51+
52+
- name: Publish governance summary
53+
if: always()
54+
run: |
55+
cat agent_governance_summary.md >> "$GITHUB_STEP_SUMMARY"

.github/workflows/ase_plugin_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ jobs:
4848
- name: Configure & Build ABACUS (GNU)
4949
run: |
5050
git config --global --add safe.directory `pwd`
51-
export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU32_DIST_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH}
52-
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}
53-
export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU32_DIST_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH}
51+
export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU_DIST32_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH}
52+
export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU_DIST32_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}
53+
export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU_DIST32_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH}
5454
export CMAKE_PREFIX_PATH=${PEXSI32_ROOT}:${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH}
5555
source toolchain/install/setup
5656
rm -rf build

.github/workflows/build_test_cmake.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ jobs:
7070
- name: Build
7171
run: |
7272
git config --global --add safe.directory `pwd`
73-
export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU32_DIST_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH}
74-
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}
75-
export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU32_DIST_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH}
73+
export LD_LIBRARY_PATH=${GKLIB_ROOT}/lib:${METIS32_ROOT}/lib:${PARMETIS32_ROOT}/lib:${SUPERLU_DIST32_ROOT}/lib:${PEXSI32_ROOT}/lib:${LD_LIBRARY_PATH}
74+
export PKG_CONFIG_PATH=${GKLIB_ROOT}/lib/pkgconfig:${METIS32_ROOT}/lib/pkgconfig:${PARMETIS32_ROOT}/lib/pkgconfig:${SUPERLU_DIST32_ROOT}/lib/pkgconfig:${PEXSI32_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}
75+
export CPATH=${GKLIB_ROOT}/include:${METIS32_ROOT}/include:${PARMETIS32_ROOT}/include:${SUPERLU_DIST32_ROOT}/include:${PEXSI32_ROOT}/include:${CPATH}
7676
export CMAKE_PREFIX_PATH=${PEXSI32_ROOT}:${SUPERLU_DIST32_ROOT}:${PARMETIS32_ROOT}:${METIS32_ROOT}:${GKLIB_ROOT}:${CMAKE_PREFIX_PATH}
7777
source toolchain/install/setup
7878
rm -rf build

.github/workflows/cuda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
nvidia-smi
4747
source toolchain/install/setup
4848
rm -rf build
49-
cmake -B build -G Ninja -DUSE_CUDA=ON -DBUILD_TESTING=ON
49+
cmake -B build -G Ninja -DUSE_CUDA=ON -DBUILD_TESTING=ON -DENABLE_FLOAT_FFTW=ON
5050
cmake --build build -j4
5151
cmake --install build
5252

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ obj
66
OUT.*
77
log.txt
88
result.out
9+
test.sum
910
*.dat
1011
.DS_Store
1112
.cache
@@ -26,4 +27,5 @@ abacus.json
2627
toolchain/install/
2728
toolchain/abacus_env.sh
2829
.trae
30+
.codex
2931
compile_commands.json

0 commit comments

Comments
 (0)