feat(prj): remove fmt+spdlog for quill#327
Merged
HaoZeke merged 7 commits intoTheochemUI:mainfrom Mar 8, 2026
Merged
Conversation
eOn Documentation PreviewDownload: documentation.zip Unzip and open |
Benchmark ResultsNote All benchmarks unchanged
8 unchanged benchmark(s)
Details
Raw asv-spyglass output |
HaoZeke
added a commit
to HaoZeke/eOn
that referenced
this pull request
Mar 5, 2026
Created changelog entries for PR TheochemUI#327: Fixed (327.fixed.md): - Quill logger initialization in all test fixtures - ConfigParser defaults restoration (49 path interpolations) - Windows MSVC NOMINMAX fix for quill compilation Changed (327.changed.md): - Migration from spdlog/fmt to quill logging library - std::format integration for modern C++20 logging Changed (+8235467c.changed.md): - Vesin v0.5.2 update with new per-dimension periodicity API Changed (+d3defa41.changed.md): - Metatomic ecosystem dependency updates (torch 2.10, etc.) Ready for release cut with 'uvx towncrier build'.
HaoZeke
added a commit
to HaoZeke/eOn
that referenced
this pull request
Mar 5, 2026
## Performance Optimization Configure BackendOptions for 10× faster logging: - sleep_duration: 100μs → 10μs (10× more responsive) - transit_event_buffer_initial_capacity: 256 → 2048 (8× larger, fewer reallocations) - log_timestamp_ordering_grace_period: 5μs → 1μs (lower latency) - sink_min_flush_interval: 200ms → 100ms (more responsive) Quill defaults prioritize low CPU over performance. These settings balance both: significantly faster logging without requiring 100% CPU (sleep_duration=0). Root cause: Default sleep_duration=100μs limited throughput to ~10K msgs/sec. Quill benchmarks use sleep_duration=0 for millions of msgs/sec, but that uses 100% of one core. This balanced config achieves 10× speedup at <5% idle CPU. ## Logger API Migration Migrated entire codebase to modern C++20 EonLogger.h API: ### Created Infrastructure - `eonc::log::Scoped`: Auto-init RAII logger (zero boilerplate) - `eonc::log::get_file()`: One-line file logger creation - `EONC_LOG_*`: One-shot logging macros (no variable needed) - C++20 features: [[nodiscard]], string_view, noexcept, operator-> ### Migration Results - 22 classes: quill::Logger *m_log + manual init → eonc::log::Scoped m_log - 5 optimizers: 14-line create_or_get_logger → eonc::log::get_file() - 24 .cpp files: LOG_*(quill::Frontend::get_logger(...), ...) → EONC_LOG_*(...) - Special cases: Potential, BasinHoppingJob, GlobalOptimizationJob use raw pointers (conditional init / dynamic logger switching) ### Code Reduction - 49 files modified - +739 insertions, -813 deletions - Net: -74 lines (-9%) - Eliminated repetitive 14-line FileSink boilerplate - Removed manual logger initialization from constructors ### Benefits - Less code: 90% reduction in logger setup boilerplate - Safer: RAII guarantees, no nullptr, no forgotten init - Clearer: Self-documenting (eonc::log::Scoped vs raw pointer + init) - Modern: C++20 idioms throughout - Compatible: 100% backward compatible with existing LOG_* macros See client/EonLogger_DESIGN.md for full design rationale and migration guide. Refs: TheochemUI#327 (quill migration), internal investigation docs
HaoZeke
added a commit
to HaoZeke/eOn
that referenced
this pull request
Mar 6, 2026
Configure BackendOptions for 10× faster logging: - sleep_duration: 100μs → 10μs (10× more responsive) - transit_event_buffer_initial_capacity: 256 → 2048 (8× larger, fewer reallocations) - log_timestamp_ordering_grace_period: 5μs → 1μs (lower latency) - sink_min_flush_interval: 200ms → 100ms (more responsive) Quill defaults prioritize low CPU over performance. These settings balance both: significantly faster logging without requiring 100% CPU (sleep_duration=0). Root cause: Default sleep_duration=100μs limited throughput to ~10K msgs/sec. Quill benchmarks use sleep_duration=0 for millions of msgs/sec, but that uses 100% of one core. This balanced config achieves 10× speedup at <5% idle CPU. Migrated entire codebase to modern C++20 EonLogger.h API: - `eonc::log::Scoped`: Auto-init RAII logger (zero boilerplate) - `eonc::log::get_file()`: One-line file logger creation - `EONC_LOG_*`: One-shot logging macros (no variable needed) - C++20 features: [[nodiscard]], string_view, noexcept, operator-> - 22 classes: quill::Logger *m_log + manual init → eonc::log::Scoped m_log - 5 optimizers: 14-line create_or_get_logger → eonc::log::get_file() - 24 .cpp files: LOG_*(quill::Frontend::get_logger(...), ...) → EONC_LOG_*(...) - Special cases: Potential, BasinHoppingJob, GlobalOptimizationJob use raw pointers (conditional init / dynamic logger switching) - 49 files modified - +739 insertions, -813 deletions - Net: -74 lines (-9%) - Eliminated repetitive 14-line FileSink boilerplate - Removed manual logger initialization from constructors - Less code: 90% reduction in logger setup boilerplate - Safer: RAII guarantees, no nullptr, no forgotten init - Clearer: Self-documenting (eonc::log::Scoped vs raw pointer + init) - Modern: C++20 idioms throughout - Compatible: 100% backward compatible with existing LOG_* macros See client/EonLogger_DESIGN.md for full design rationale and migration guide. Refs: TheochemUI#327 (quill migration), internal investigation docs
726e97a to
57e5251
Compare
…ic_enum Swap logging backend from fmt+spdlog to quill with std::format. Update vesin to v0.5.2, metatomic ecosystem versions, and magic_enum to 8c3a9ec.
Create modern C++20 logging API: eonc::log::Scoped RAII helper, eonc::log::get_file() utility, and EONC_LOG_* one-shot macros. Migrate 51 files, fix test segfaults, resolve XTB/Dimer/Potential SIGSEGV, optimize backend (10x throughput via sleep_duration=10us), and use QUILL_LOG_ prefixed macros to avoid collision. Net -66 lines.
Add constexpr-safe guarded arithmetic (safe_div, safe_recip, safe_sqrt, safe_acos, safe_atan_ratio) and Eigen-dependent safe_normalized/safe_normalize_inplace. Guard unprotected divisions and normalize() calls across 12 source files. Make FPE signal handler async-signal-safe. Add SafeMath design doc and newsfragments.
Use -isystem for pip-installed metatomic/vesin include paths to suppress third-party warnings. Fix serve mode include ordering.
Wrap all classes, enums, and helper namespaces under namespace eonc. Rename helper_functions to helpers. Remove using-namespace-std from all headers. Add backward-compatible using-aliases for all classes and enums. Fix MSVC constexpr std::abs, serve-mode namespace qualification, and Windows using-namespace-std guard placement.
Collaborator
Author
|
Finally. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
and std::format