grackle-3.4.0
Grackle 3.4 and pygrackle 1.1 are released!
Grackle is a library that provides chemistry and radiative cooling solver for astrophysical simulations and models. Pygrackle provides python bindings to the Grackle library.
This release consists of 53 Pull Requests from 6 contributors (4 of them are first-time contributors). It includes 8 minor enhancements and 4 bugfixes. This release features a number of usability improvements: (i) a new CMake Build System, (ii) introduce machinery to make it easier for simulation codes to link against Grackle, and (iii) making Pygrackle easier to install
If you're updating an existing git-repository, we suggest invoking make clean within src/clib directory before updating to the newest commit. The placement of artifacts produced by the Classic build-system had to be slightly modified to better coexist with the new CMake Build System.
Important
Grackle's Classic Makefile-based build-system has been deprecated and is scheduled for removal in the next minor release (3.5). Please, start using the new CMake-based system, and reach out to us (via GitHub/Slack/the mailing) with any questions/problems/issues.
The new CMake Build System
We have introduced a new CMake build-system. On most platforms, you can compile Grackle by simply cloning the repository and invoking the standard CMake commands (from the root of the repository):
cmake -B build
cmake --build ./buildMachine-specific files aren't needed! (But they can still be used). Our Installation Guide provides detailed instructions for users that have never used CMake before, provides a troubleshooting guide (e.g. if HDF5 is installed in an irregular location), and describes additional configuration options (e.g. selecting floating point precision, enabling OpenMP).
The new CMake build-system is generally more robust than the classic build system (e.g. build-artifacts are more likely to be correct when using a new machine).
Easier Grackle-Integration in Simulation Codes
Our new Integration Guide provides detailed descriptions of functionality that the new CMake Build System provides to make Grackle easier to use as a dependency in external applications. Some highlights include:
- If an external code is built with CMake, the code's build-system can
- perform automatic dependency management of Grackle. For example, Enzo-E's build-system can automatically download, compile, & link Grackle as part of building Enzo-E
- use CMake's
find_packagecommand to link against standalone Grackle installations. There's experimental support for linking against Grackle builds (i.e. that aren't installed)
- For external codes build with ANY build-system:
- use the grackle.pc file (provided in Grackle installations). To use this file you you can either use the pkg-config (or pkgconf) command-line tool (a standard tool provided at many computing facillities) or wrapper-commands provided by many popular build systems (e.g. autotools, Meson, or even CMake).
- the grackle.pc files provides meta-data and the compiler/linker flags needed to use Grackle
Importantly, all of the above functionality makes it possible to easily use Grackle as a static library and for the query Grackle metadata during builds (e.g. version number, precision of gr_float, configuration of OpenMP)
Making Pygrackle easier to install
Installing Pygrackle has never been easier. After downloading Grackle (and making sure HDF5 installed), you can simply invoke pip install . from the root directory. While installing Pygrackle, this will automatically compile a fresh copy of Grackle and include it as part of Pygrackle (the documentation explains how to link against pre-installed copies of Grackle).
Behind the scenes, we've replaced Pygrackle's build backend. We have plans to support installation of Pygrackle from PyPI in the near future.
List of All Changes
Minor Enhancements
- headers can now be directly included in C++ source files (without wrapping them in
extern "C"blocks) #199 - Updating behavior of
HydrogenFractionByMassparameter #200 - Introduce
gr_initialize_field_datafunction #205 #233 - Introduce
GR_SUCCESSandGR_FAILas named constants for status-reporting #217 get_temperature_unitsandget_velocity_unitsnow acceptconst* code_unitsas an argument #230- Introduce
gr_required_unitsfunction #209 - Introduce
gr_check_consistencyfunction #279 - Pygrackle: allow unsupported simulation types to work with grackle yt fields. #213
Bugfixes
- fix import VisibleDeprecationWarning numpy 2.0 #240
- Tweaks required for 3.4 release (Fortran Binding bugfix and a few removals) #265
- Backport some minor bugfixes #289
- Fix bugs in
$H_2$ self-shielding implementations in solve_rate_cool_g.F #299
Build System
- Refactoring so all autogenerated files are put in separate dir #203
- Introducing Experimental Supplementary CMake Build System #182 #238
- Fixup query_version.py #242
- mach file for fedora #252
- Rename
configdirectory so that it's now calledsupport#305 - Address Less Common CMake Configuration Issues #310
- Mention Enzo-E as an example for auto-install #314
Testing
- Testing Refactor #215
- Convert reaction rate test to gold standard model #236
- Update grackle data files submodule. #239
- Transition
Pygracklefromsetuptoolstoscikit-build-core#208 - Example Google Test created #243
- Answer test refactor #245
- Convert
cxx_grid_exampleto a googletest test-case #254 - Tweaking code example tests #258
- Make
pytestinvokable from the root directory #282 - Add instructions for running the corelib tests #284
- 2 minor (but important) googletest-related CMake tweaks #295
- tests: gracefully handle
yt_grackletest-case whenYT_DATA_DIRisn't defined #302
Documentation
- Better Describe Local Functions - with
"sphinx_tabs"#206 - Adopt ReadTheDocs theme #221
- add a list of software that uses Grackle to the
README.mdfile #225 - Updating the README #293
Deprecations
- Deprecate public headers other than
grackle.handgrackle.def#229 #288 - Deprecated classic build system (scheduled for removal in the next PR) #304
Miscellaneous
- Moved public headers into a separate directory. #188
- Remove the lone
cimport numpyline #224 - Centralized configuration information within config.py.in #244
- Fix ReadTheDocs doc CI build #257
- CI: shift core-library tests to a separate "job" #283
- Circleci tweaks -- from Gold Standard Update #298 #308
src/example/Makefilecleanup #311- Introduce a warning discouraging people from using
pygrackle.utilities.data_path.grackle_data_dirin external code #297
Contributors
- @brittonsmith
- @ChristopherBignamini (new!)
- @hsinhaoHHuang (new!)
- @mabruzzo
- @omne-shree (new!)
- @thinhhn2 (new!)
Full Changelog: grackle-3.3.0...grackle-3.4.0