Skip to content

Fix(exx): validate device_exx choices and make selector types explicit - #59

Draft
Stardust0831 wants to merge 10 commits into
base/explicit-types-20261125from
fix/exx-device-selector
Draft

Stardust0831 wants to merge 10 commits into
base/explicit-types-20261125from
fix/exx-device-selector

Conversation

@Stardust0831

Copy link
Copy Markdown
Owner

Linked Issue

Follows the review of the LibRI/DDLA EXX selector.

What's changed?

  • Register cpu and gpu with device_exx using item.domain.set_choices. The INPUT reader now reports the supplied value and both legal choices. The default is cpu. Selecting gpu still requires LCAO, device=gpu and a build with ENABLE_LIBRI_GPU.
  • Exercise the invalid value ddla through an LCAO INPUT file. The selector test continues to cover the GPU configuration and build guards.
  • Remove all five uses of auto introduced by the EXX change. The selector uses RI::LRI_Cal_Mode&. The test names its list, iterator and input-reference types and uses a static helper for the rejection assertions.

Unit Tests and/or Case Tests for my changes

  • Built the repository test sources with GCC 13.3 in C++11 mode, once with __GPU_RI disabled and once with it enabled. In both builds, OMP_NUM_THREADS=1 ./input-tests passed 53/53 and OMP_NUM_THREADS=1 ./exx-input-test --gtest_filter=DeviceExxInput.SelectionAndValidation passed 1/1 in the default death-test mode.
  • As a control, --gtest_death_test_style=threadsafe failed to capture the expected stdout under Google Test 1.11 on both the base and this branch. The direct reader checks below also verify stdout in separate processes.
  • A small driver called ReadInput::read_parameters on actual INPUT files. Both builds accepted default and explicit cpu. ../cpu/read-device-exx INPUT.ddla exited 1 and printed Invalid INPUT parameter 'device_exx': supplied 'ddla'. Expected one String from {cpu, gpu}. The same diagnostic appeared with GPU RI enabled. ../cpu/read-device-exx --help-device-exx listed both choices.
  • g++ -std=c++14 -fopenmp -fsyntax-only compiled all four real/complex Exx_LRI_Interface::set_gpu specializations with the LibRI v0.3.0.0 and DDLA v0.0.7 headers. These checks cover host-side selection and header compilation. A full executable, MPI calculation and on-device GPU run were outside this check.

Governance Notes

No documentation update required because the built-in help and generated INPUT documentation read the choices from the Input_Item registration.

Stardust0831 and others added 4 commits November 25, 2026 16:18
…eepmodeling#8388)

* fix(pw): retain kinetic density and meta-GGA action for SCAN0

* test(pw): link Meta regression with parameter definitions

* test(pw): match Meta test to serial plane-wave class layout
* Fix: sign of DFT-D3 and DFT-D4 stress

s-dftd3 (virial) and dftd4 (sigma) return the strain derivative dE/d(epsilon).
ABACUS stress is -(1/Omega) dE/d(epsilon), but Vdwd3 and Vdwd4 mapped it to
+2 sigma / Omega, so the D3/D4 stress had the wrong sign. D2 was not affected.

- Negate the stress mapping in Vdwd3::evaluate_impl and
  Vdwd4::set_stress_from_sigma.
- Migrate vdw_test.cpp to unittests/test_vdw.cpp and flip the D3/D4 stress
  references (for D3 this restores the sign used before deepmodeling#7830). Add
  finite-strain checks of the D2/D3/D4/D4S stress against the vdW energy.
- Return the gtest result from main so that failures are reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tests: update totalstressref of the D3/D4 Autotest cases

Regenerated with the fixed D3/D4 stress sign. Only totalstressref changes;
etotref and totalforceref still pass with the existing references, and the
D2 case relax_cell_vdw2 is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Stardust0831 and others added 6 commits November 25, 2026 19:05
…ing#8389)

* perf(lcao): solve low-band eigenpair subsets with cuSOLVER

* style(lcao): remove noreturn from cuSOLVER diagnostic helper

---------

Co-authored-by: Xiaoyang Zhang <tsfxwbbzxy@163.com>
* docs: clarify contributor guidance for implementation and review

* Docs: Restore the Autotest helper clarification

* Docs: Limit integration test guidance changes to references

* Docs: describe scalar INPUT choice validation

* Docs: simplify the shared INPUT validation guide

---------

Co-authored-by: Xiaoyang Zhang <tsfxwbbzxy@163.com>
…odeling#8334)

* test(stodft): cover scalar stochastic functions and cutoff boundaries

* test(stodft): consolidate legacy unit tests under unittests
…d CUDA (deepmodeling#8391)

* Refactor(io): spell out INPUT domain and reader types

* Refactor(wannier): make spin-matrix output types explicit

* Refactor(lcao): name radial table and orbital types

* Refactor(ofdft): name the CUDA filtered buffer pointer type

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants