Skip to content

fix: ASE_POT compilation errors and lazy Python interpreter init#325

Merged
HaoZeke merged 5 commits intoTheochemUI:mainfrom
HaoZeke:fix/ase-pot-compilation
Mar 4, 2026
Merged

fix: ASE_POT compilation errors and lazy Python interpreter init#325
HaoZeke merged 5 commits intoTheochemUI:mainfrom
HaoZeke:fix/ase-pot-compilation

Conversation

@HaoZeke
Copy link
Collaborator

@HaoZeke HaoZeke commented Mar 4, 2026

Closes #324.

Four bugs in client/potentials/ASE/ASE.cpp:

  • Constructor named ASEOrcaPot instead of ASE (copy-paste from ASE_ORCA)
  • PotType::ASE_ORCA instead of PotType::ASE_POT
  • isFPEEnabled/disableFPE/enableFPE don't exist; use eonc::FPEHandler
  • Undeclared variable N; should be nAtoms

Additional fixes:

  • Rename -DASE_POT to -DWITH_ASE_POT (macro clashed with PotType enum)
  • Factory used make_shared<ASE_POT> instead of make_shared
  • Lazy singleton interpreter (PyGuard.h) so non-ASE runs pay zero Python overhead; replaces per-site scoped_interpreter guards in ClientEON.cpp, GPSurrogateJob.h, and testpot.cpp
  • ASE_ORCA and ASE_NWCHEM constructors call ensure_interpreter() for consistency
  • Fix numpy include_directories() error on meson <1.10 by using compile_args instead
  • Add ASE LJ test (ASEPotTest.cpp) with reference values
  • Add ci_ase.yml workflow
  • Rewrite ase_pot.md with build instructions and examples

HaoZeke added 2 commits March 4, 2026 03:43
Four bugs in client/potentials/ASE/ASE.cpp:
- Constructor named ASEOrcaPot instead of ASE (copy-paste from ASE_ORCA)
- PotType::ASE_ORCA instead of PotType::ASE_POT
- isFPEEnabled/disableFPE/enableFPE don't exist; use eonc::FPEHandler
- Undeclared variable N; should be nAtoms

Additional fixes:
- Rename -DASE_POT to -DWITH_ASE_POT (macro clashed with PotType enum)
- Factory used make_shared<ASE_POT> instead of make_shared<ASE>
- Lazy singleton interpreter (PyGuard.h) so non-ASE runs pay zero
  Python overhead; replaces per-site scoped_interpreter guards in
  ClientEON.cpp, GPSurrogateJob.h, and testpot.cpp
- ASE_ORCA and ASE_NWCHEM constructors call ensure_interpreter() for
  consistency
- Fix numpy include_directories() error on meson <1.10 by using
  compile_args instead
- Add ASE LJ test (ASEPotTest.cpp) with reference values
- Add ci_ase.yml workflow
- Rewrite ase_pot.md with build instructions and examples
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

eOn Documentation Preview

Download: documentation.zip

Unzip and open index.html to view.

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Benchmark Results

Note

All benchmarks unchanged

Count
⚪ Unchanged 8
8 unchanged benchmark(s)
Benchmark Before After Ratio
bench_eonclient.TimeMinimizationLJCluster.peakmem_minimization_lbfgs 27.2M 27.2M ~1x
bench_eonclient.TimeMinimizationLJCluster.time_minimization_lbfgs 36.7±0ms 37.5±0ms ~1.02x
bench_eonclient.TimeNEBMorsePt.peakmem_neb 27.2M 27.2M ~1x
bench_eonclient.TimeNEBMorsePt.time_neb 511±0ms 518±0ms ~1.01x
bench_eonclient.TimePointMorsePt.peakmem_point_evaluation 27.2M 27.2M ~1x
bench_eonclient.TimePointMorsePt.time_point_evaluation 6.76±0ms 7.24±0ms ~1.07x
bench_eonclient.TimeSaddleSearchMorseDimer.peakmem_saddle_search_dimer 27.2M 27.1M ~1x
bench_eonclient.TimeSaddleSearchMorseDimer.time_saddle_search_dimer 60.6±0ms 62.7±0ms ~1.03x
Details
  • Base: 9160f9da
  • Head: 4581068b
  • Runner: ubuntu-22.04
Raw asv-spyglass output
All benchmarks:

| Change   | Before   | After    |   Ratio | Benchmark (Parameter)                                                  |
|----------|----------|----------|---------|------------------------------------------------------------------------|
|          | 27.2M    | 27.2M    |    1    | bench_eonclient.TimeMinimizationLJCluster.peakmem_minimization_lbfgs   |
|          | 36.7±0ms | 37.5±0ms |    1.02 | bench_eonclient.TimeMinimizationLJCluster.time_minimization_lbfgs      |
|          | 27.2M    | 27.2M    |    1    | bench_eonclient.TimeNEBMorsePt.peakmem_neb                             |
|          | 511±0ms  | 518±0ms  |    1.01 | bench_eonclient.TimeNEBMorsePt.time_neb                                |
|          | 27.2M    | 27.2M    |    1    | bench_eonclient.TimePointMorsePt.peakmem_point_evaluation              |
|          | 6.76±0ms | 7.24±0ms |    1.07 | bench_eonclient.TimePointMorsePt.time_point_evaluation                 |
|          | 27.2M    | 27.1M    |    1    | bench_eonclient.TimeSaddleSearchMorseDimer.peakmem_saddle_search_dimer |
|          | 60.6±0ms | 62.7±0ms |    1.03 | bench_eonclient.TimeSaddleSearchMorseDimer.time_saddle_search_dimer    |

@HaoZeke HaoZeke merged commit eb158f5 into TheochemUI:main Mar 4, 2026
12 of 13 checks passed
@HaoZeke HaoZeke deleted the fix/ase-pot-compilation branch March 4, 2026 03:18
HaoZeke added a commit that referenced this pull request Mar 4, 2026
fix: ASE_POT compilation errors and lazy Python interpreter init
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.

How to enable the ASE Interface

1 participant