Release notes for sbmlsim 0.18.2
Faster parallel scans with large results and a faster import, and a cleanup of unused and duplicated code. Results do not change.
Features
- The results of a pool scan travel through shared memory (#480). A worker writes an array of a chunk of at least 1 MiB into a segment of shared memory, which the parent reads without a copy (
sbmlsim.simulator.shared), instead of pickling it through the pipe of the pool; no segment outlives a run, also after an error, Ctrl-C or a dead worker. A scan of the midazolam model over 2000 points with all 268 selections on a grid of 200 times (858 MB) takes 0.69 s instead of 0.95 s on 4 workers; the results are bitwise those of a serial run. Serial runs, small results and windows pickle as before. pymizu, a shared-memory pool, was compared and is not used: for results of 214 MB the stdlib shared memory is 2.6 times faster. - The unit registry is built from a disk cache (#479). The parsed definitions of pint are cached under
~/.cache/sbmlsim/units/(SBMLSIM_UNITS_CACHE, empty for none), soimport sbmlsimtakes 0.36 s instead of 0.44 s in every process and every worker of a pool; an unusable cache falls back to the registry without it, and the registry is the same. Project.experiment_runner(#478) initializes experiments with the paths and the JIT level of a project, as the project checks andverify dumpdo.
Cleanup
- Unused functions and constants are removed (#478):
data.load_pkdb_dataframes_by_substance,RoadrunnerSBMLModel.get_state_path,utils.md5_for_path,plotting.DEFAULT_COLORS,templates.BASE_TEMPLATE,testsuite.runner.FAILED_STATUS; none of sbmlsim, pkpdsim or pkdb_models used them. - The hashes of the run layer and the checksums of files are computed by
sbmlsim.hashing, pinned by tests to the values before; the test suites of PEtab and SciML share the base of their case results; the tests run withfilterwarnings = error.