Centralized Fortran logging#108
Open
aoymt wants to merge 21 commits into
Open
Conversation
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.
Summary
This pull request introduces a shared logging facility in
m_common, then migrates a large portion of the codebase fromwriteusage to that API. The goal is more consistent, controllable diagnostics across TurboRVB tools and drivers.What changed
New modules and provenance
Logging stack: The files
stdlib_logger.f90,stdlib_ascii.f90,stdlib_kinds.f90, andstdlib_optval.f90are taken from the Fortran standard library (fortran-lang/stdlib), copied intosrc/m_common/, and adapted locally so they build and integrate cleanly inside TurboRVB (this is not a full stdlib subtree).Project-specific layer:
logger_io.f90is a TurboRVB-specific thin wrapper aroundstdlib_loggerfor convenient call sites.tostring.f90(M_tostring) provides generic-to-string conversion used by that wrapper; it follows a pattern described on Fortran Wiki — tostring.Build:
m_common/CMakeLists.txtis updated to compile and link these new sources.Call-site migration
a_convertfort10,a_convertfort10mol,a_convertfortpfaff,a_makefort10,a_prep,a_readforward,a_tools,a_turborvb,b_complex, and manym_commonutilities) now route diagnostics through the new logging layer instead of scattered direct output, with related cleanups where output paths were touched.Licensing
Vendored stdlib-derived sources remain subject to the Fortran stdlib license (typically MIT). The authoritative license text is in per-file notices where present.
Notes
prep,turborvb, a couple ofa_toolsprograms) for expected stdout/stderr behavior and log levels.