Releases: BerkeleyLab/assert
Invoke "assert" via macro and more robust testing
This release adds the include/assert_h.F90
file containing preprocessor macros that guarantee the complete removal of assert
subroutine calls when a macro is used and the compile-time flag -DASSERTIONS
is not present or -DASSERTIONS=0
is present. The new macros may appear in code in the following forms:
call_assert(assertion)
,call_assert_describe(assertion, description)
, andcall_assert_diagnose(assertion, description, diagnostic_data)
,
where assertion
, description
, and diagnostic_data
correspond to the assert
subroutine's dummy arguments. In the first form above, the macro automatically generates a description
actual argument including the file name and line number of the macro's point of use in the source code.
This release also handles other chores, fixes an issue that caused some tests to report passing for incorrect reasons, and works around an issue with LLVM flang
19.1.1.
What's Changed
- Feature: offer macros for invoking the assert subroutine only when -DDEBUG is passed by @rouson in #29
- Install library by @rouson in #30
- doc(README): fix typo in fpm command by @rouson in #32
- Fix warnings on multi-include by @bonachea in #33
- Macro docs by @bonachea in #38
- UC License update by @bonachea in #39
- Fix GitHub deploy-docs.yml workflow by @bonachea in #40
- Change assertion enforcement control knob to ASSERTIONS=1/0 by @bonachea in #41
- Auto description by @bonachea in #42
- Cray Fortran fixes by @bonachea in #45
- Assert always by @bonachea in #43
- Repair the non-functional false-assertion test by @bonachea in #44
- Fix issue #46: workaround some compile errors with flang-new 19.1.1 by @bonachea in #47
New Contributors
Full Changelog: 1.7.0...2.0.0
Support building with LLVM Flang
This release uses preprocessor macros to replace use of parallel Fortran features which currently enables compilation with LLVM Flang.
What's Changed
- Chores: fix error message & document build commands with more compilers by @rouson in #23
- Update README.md by @rouson in #25
- feat(build): support flang-new by @rouson in #26
Full Changelog: 1.6.0...1.7.0
Support Cray Compiler Environment (CCE) 17.0.0
This release uses preprocessor macros to work around bugs that we have reported in the Cray Fortran compiler.
What's Changed
- fix(intrinsic_array): cray compiler bug workaround by @rouson in #21
- Work around Cray Compiler Environment (CCE) 17.0.0 bugs by @rouson in #22
Full Changelog: 1.5.0...1.6.0
Support more intrinsic_array_t ranks with the the NAG compiler
What's Changed
- Remove unnecessary macros & refactor directory structure by @rouson in #19
- feat(fpm.toml): increment version to 1.5.0 by @rouson in #20
Full Changelog: 1.4.0...1.5.0
1.4.0
What's New
- Testing: Run CI tests and deploy documentation by @everythingfunctional in #10 👷
- Testing: Use newer versions of dependencies in the CI by @everythingfunctional in #15 👷
- Documentation: Remove workaround for
ford
versions < 6.1 by @rouson in #11 📖 - Documentation: Update build instructions & remove macros used with
nagfor
versions < 7.1 by @rouson in #13 📖 - Documentation: Update copyright year by @rouson in #12 📖
- Feature: support double precision & 3D arrays intrinsic_array_t constructor by @rouson in #14 🔢
- Bug fix: work around
gfortran
's erroneous array allocation warning messages intrinsic_array_s by @praynaud in #17⚠️ - Bug fix: Eliminate additional
gfortran
warning messages by @rouson in #18⚠️
New Contributors
- @everythingfunctional made their first contribution in #10
- @praynaud made their first contribution in #17
Full Changelog: 1.3.0...1.4.0
Build with the NAG compiler
The Numerical Algorithms Group (NAG) compiler, nagfor
, does not yet support assumed-rank dummy arguments. This release uses NAG's Fortran preprocessor to substitute a rank-one array in the intrinsic_array_t
type user-defined structure constructor. To build Assert with nagfor
and run the tests
fpm test --compiler nagfor --flag -fpp
Bug fix and feature
This release
- Expands support for encapsulating multidimensional arrays in
intrinsic_array_t
- Work around NAG compiler's lack of support for Fortran 2018 assumed-rank dummy arguments.
New tests, documentation, and diagnostic data type/rank
New Features
- New intrinsic_array_t type and constructor facilitate intrinsic-array diagnostic data. 📑
Refactoring
- Reorganize/rename files/directories. 🧹
Testing
- All tests pass. 💯
- Add unit tests.
- Add tests that intentionally error-terminate.
- Silence most output from tests that intentionally error-terminate.
Documentation
- Update README.md. 📜
- Add PlantUML diagram for classes in Assert 🪴
- Fix typographical errors in documentation 🩹
Initial release
The assert
subroutine performs as described in the README.md and in the example/README.md.