readcon-db 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/ci.yml +7 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/ci_mpi.yml +1 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/CHANGELOG.md +28 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/CITATION.cff +1 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/CMakeLists.txt +6 -5
- {readcon_db-0.2.3 → readcon_db-0.2.4}/Cargo.lock +60 -3
- {readcon_db-0.2.3 → readcon_db-0.2.4}/Cargo.toml +23 -2
- {readcon_db-0.2.3 → readcon_db-0.2.4}/PKG-INFO +7 -2
- {readcon_db-0.2.3 → readcon_db-0.2.4}/README.md +6 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/explanation/architecture.org +1 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/explanation/design.org +4 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/howto/install.org +8 -3
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/howto/mpi.org +1 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/howto/streaming.org +12 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/reference/c.org +11 -4
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/reference/fortran.org +2 -2
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/reference/python.org +1 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/reference/rust.org +4 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/fortran/README.md +1 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/fortran/ReadConDb/fpm.toml +1 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/fortran/ReadConDb/src/readcon_db.f90 +26 -2
- {readcon_db-0.2.3 → readcon_db-0.2.4}/include/readcon-db-mpi.h +1 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/include/readcon-db.h +16 -3
- {readcon_db-0.2.3 → readcon_db-0.2.4}/meson.build +8 -1
- readcon_db-0.2.4/meson_options.txt +8 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/pixi.toml +1 -1
- readcon_db-0.2.4/python/tests/test_extend_precision.py +79 -0
- readcon_db-0.2.4/python/tests/test_hash_con_text.py +24 -0
- readcon_db-0.2.4/python/tests/test_ingest_memory.py +51 -0
- readcon_db-0.2.4/resources/test/con_v4/README.md +56 -0
- readcon_db-0.2.4/resources/test/con_v4/tiny_cuh2_v4.con +17 -0
- readcon_db-0.2.4/resources/test/con_v4/tiny_cuh2_v4.convel +26 -0
- readcon_db-0.2.4/resources/test/highprec_a.con +15 -0
- readcon_db-0.2.4/resources/test/highprec_b.con +15 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/check_version_lockstep.py +2 -2
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/meson_cargo_build.py +3 -2
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/package-clib.sh +3 -4
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/archive.rs +164 -158
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/canonical.rs +1 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/cooked_soa.rs +5 -4
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/corpus.rs +433 -73
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/export_h5md.rs +2 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/export_xyz.rs +4 -1
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/ffi.rs +269 -4
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/lib.rs +9 -2
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/mpi_ingest.rs +2 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/python.rs +40 -7
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/units_canon.rs +42 -12
- readcon_db-0.2.4/tests/capi_symbols.rs +137 -0
- readcon_db-0.2.4/tests/cdylib_static_tls.rs +163 -0
- readcon_db-0.2.4/tests/cmake-project/main.c +104 -0
- readcon_db-0.2.4/tests/con_v4_fixtures.rs +64 -0
- readcon_db-0.2.4/tests/hash_file.rs +63 -0
- readcon_db-0.2.4/tests/meson-wrap/main.c +93 -0
- readcon_db-0.2.3/meson_options.txt +0 -8
- readcon_db-0.2.3/python/tests/test_ingest_memory.py +0 -27
- readcon_db-0.2.3/tests/cmake-project/main.c +0 -28
- readcon_db-0.2.3/tests/meson-wrap/main.c +0 -17
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/c_lib_tarball.yml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/ci_cxx.yml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/ci_docs.yml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/ci_prek.yml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/crates_publish.yml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/cxx_tarball.yml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/lint.yml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/pages.yml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.github/workflows/python-wheels.yml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/.gitignore +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/CODE_OF_CONDUCT.md +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/CONTRIBUTING.md +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/LICENSE +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/SECURITY.md +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/assets/logo/BRAND.md +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/assets/logo/readcon-db-logo-512.png +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/assets/logo/readcon-db-logo-raster.jpg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/assets/logo/readcon-db-logo.svg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/assets/logo/readcon-db-wordmark.svg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/bench/gen_con.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/bench/mpi_bench.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/bench/vary_con.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/cmake/readcon-db-config-version.in.cmake +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/cmake/readcon-db-config.in.cmake +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/cmake/readcon-db.pc.in +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/cmake/tempdir.cmake +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/cog.toml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/Makefile +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/_static/logo.svg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/changelog.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/contributing/index.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/cooked-soa.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/explanation/faq.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/explanation/overview.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/howto/atom-order.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/howto/campaign.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/howto/howto.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/howto/migration.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/howto/topology.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/howto/workflows.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/index.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/readme.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/reference/citation.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/reference/python-api.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/tutorials/getting-started.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/tutorials/tutorial-run.log +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/tutorials/tutorial-run.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/orgmode/tutorials/tutorial.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/requirements.txt +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/_static/custom.css +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/_static/favicon.svg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/_static/logo-nav-dark.svg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/_static/logo-nav-light.svg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/_static/logo.svg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/_static/mark.svg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/_templates/partials/extra-foot.html +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/_templates/partials/extra-head.html +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/_templates/partials/site-foot.html +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/_templates/partials/webfonts.html +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/docs/source/conf.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/bench_corpus_ops.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/bench_vs_ase_prep.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/benchmarks/ase_db_bench.json +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/benchmarks/ase_fair_campaign_1.json +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/benchmarks/bench_ase_db.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/benchmarks/db_vs_ase_table.md +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/benchmarks/fair_campaign.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/benchmarks/fair_db_vs_ase_table.md +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/benchmarks/readcon_db_bench.json +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/benchmarks/results_merged.json +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/benchmarks/test_fair_select_parity.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/ingest_select.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/mpi_bcast_frame.c +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/mpi_bcast_frame.f90 +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/mpi_bcast_frame.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/mpi_ingest_check.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/mpi_read_check.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/shard_gate.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/workflows/metatrain_from_con.md +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/examples/workflows/options.metatrain.snippet.yaml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/lychee.toml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/packaging/wrapdb/README.md +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/packaging/wrapdb/readcon-db.wrap.in +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/paper/cpc/freeze/ase_fair_campaign_1.json +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/paper/cpc/freeze/fair_db_vs_ase_table.md +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/paper/cpc/readme.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/paper/cpc/scripts/gen_fair_table.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/paper/cpc/src/appendix-fair-campaign.org +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/paper/cpc/src/figures/generated/fair_campaign_table.tex +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/pixi.lock +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/pr-text.md +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/prek.toml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/pyproject.toml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/python/pyproject.toml +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/python/tests/test_atom_order.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/python/tests/test_catalog_claims.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/python/tests/test_export_h5md.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/python/tests/test_stream_and_random.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/python/tests/test_streaming_guide.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/resources/test/eon36_lj_dimer.convel +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/resources/test/sulfolene.con +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/resources/test/tiny_cuh2.con +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/resources/test/tiny_cuh2.convel +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/resources/test/tiny_cuh2_forces.con +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/resources/test/tiny_cuh2_vel_forces.con +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/resources/test/tiny_multi_cuh2.con +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/assemble-site.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/build-docs.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/check-clib-dist.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/check-cpc-freeze.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/check-cxx-dist.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/crate_version.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/export-landing.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/package-cxx.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/release-prep.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/set-version.sh +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/sync-version.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/scripts/test_check_version_lockstep.py +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/bin/readcon-db.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/catalog.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/error.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/frame_codec.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/frame_scalars.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/keys.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/mpi_read.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/mpi_wire.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/select.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/shard.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/src/topology.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/tests/atom_order.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/tests/canonical_dump.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/tests/catalog_claims.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/tests/claims_shard.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/tests/cli_refuse.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/tests/cmake-project/CMakeLists.txt +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/tests/cooked_soa_authority.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/tests/meson-wrap/meson.build +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/tests/mpi-c/ingest_smoke.c +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/tests/topology_cli.rs +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/website/assets/logo.svg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/website/assets/wordmark.svg +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/website/css/site.css +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/website/export.el +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/website/index.html +0 -0
- {readcon_db-0.2.3 → readcon_db-0.2.4}/website/index.org +0 -0
|
@@ -31,10 +31,17 @@ jobs:
|
|
|
31
31
|
components: clippy
|
|
32
32
|
- name: Cache cargo
|
|
33
33
|
uses: Swatinem/rust-cache@v2
|
|
34
|
+
- name: Install Python headers
|
|
35
|
+
if: runner.os == 'Linux'
|
|
36
|
+
run: sudo apt-get update && sudo apt-get install -y python3-dev
|
|
34
37
|
- name: Test (locked)
|
|
35
38
|
run: cargo test --locked --all-targets
|
|
39
|
+
- name: Test with the C ABI (capi)
|
|
40
|
+
run: cargo test --locked --all-targets --features capi
|
|
36
41
|
- name: Clippy
|
|
37
42
|
run: cargo clippy --locked --all-targets
|
|
43
|
+
- name: Clippy with the C ABI (capi)
|
|
44
|
+
run: cargo clippy --locked --all-targets --features capi
|
|
38
45
|
- name: Docs
|
|
39
46
|
run: cargo doc --locked --no-deps
|
|
40
47
|
- name: Verify registry package
|
|
@@ -106,7 +106,7 @@ jobs:
|
|
|
106
106
|
- name: C wrapper on a split communicator
|
|
107
107
|
run: |
|
|
108
108
|
set -euo pipefail
|
|
109
|
-
cargo build --features mpi --lib
|
|
109
|
+
cargo build --features mpi,capi --lib
|
|
110
110
|
${{ matrix.cc }} -Iinclude tests/mpi-c/ingest_smoke.c -Ltarget/debug -lreadcon_db -Wl,-rpath,$PWD/target/debug -o ingest_smoke
|
|
111
111
|
for p in 1 2 3 4; do
|
|
112
112
|
T=$(mktemp -d)
|
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.2.4 - 2026-11-25
|
|
4
|
+
#### Features
|
|
5
|
+
- expose hash_con_text to c, fortran and python - (6704042) - *HaoZeke*
|
|
6
|
+
#### Bug Fixes
|
|
7
|
+
- free a parsed frame in this library - (c6db980) - *HaoZeke*
|
|
8
|
+
- compile mimalloc with local-dynamic tls - (f9c24f9) - *HaoZeke*
|
|
9
|
+
- hash con text over the stored source span - (7d45827) - *HaoZeke*
|
|
10
|
+
- rescale frame units through the column arrays - (73de882) - *HaoZeke*
|
|
11
|
+
- keep source spans in extend_trajectory_str - (de86b9c) - *HaoZeke*
|
|
12
|
+
- compile the C ABI only with the capi feature - (05bf53f) - *HaoZeke*
|
|
13
|
+
#### Documentation
|
|
14
|
+
- say that a source build needs cmake outside windows - (b7a45bb) - *HaoZeke*
|
|
15
|
+
- record resume of six-decimal extend frames - (fbcc627) - *HaoZeke*
|
|
16
|
+
- say that the C ABI needs the capi feature - (2d1ce76) - *HaoZeke*
|
|
17
|
+
#### Tests
|
|
18
|
+
- reject static tls on the linux cdylibs - (344ae77) - *HaoZeke*
|
|
19
|
+
- record that con major-4 files are refused at ingest - (eb12d0b) - *HaoZeke*
|
|
20
|
+
- cover extend text identity and six-decimal resumes - (6daef42) - *HaoZeke*
|
|
21
|
+
- build each capi_symbols feature set in its own target dir - (c03b56d) - *HaoZeke*
|
|
22
|
+
- pin rkrdb_ exports to the capi feature - (7024018) - *HaoZeke*
|
|
23
|
+
#### Build system
|
|
24
|
+
- require readcon-core 0.23.2 - (98a127d) - *HaoZeke*
|
|
25
|
+
- always enable the capi feature for C ABI builds - (98df81b) - *HaoZeke*
|
|
26
|
+
#### Refactoring
|
|
27
|
+
- name FloatFormat::RoundTrip for in-memory frames - (11ac25f) - *HaoZeke*
|
|
28
|
+
#### Style
|
|
29
|
+
- taplo-format Cargo.toml - (c153759) - *HaoZeke*
|
|
30
|
+
|
|
3
31
|
## v0.2.3 - 2026-11-19
|
|
4
32
|
#### Bug Fixes
|
|
5
33
|
- join and split preserve catalog records and work claims across shards
|
|
@@ -53,7 +53,7 @@ endif()
|
|
|
53
53
|
|
|
54
54
|
option(BUILD_SHARED_LIBS "Use a shared library by default instead of a static one" ON)
|
|
55
55
|
option(READCON_DB_INSTALL_BOTH_STATIC_SHARED "Install both shared and static libraries" ON)
|
|
56
|
-
set(READCON_DB_CARGO_FEATURES "" CACHE STRING "
|
|
56
|
+
set(READCON_DB_CARGO_FEATURES "" CACHE STRING "Extra cargo features to enable (space-separated). The capi feature is always enabled.")
|
|
57
57
|
|
|
58
58
|
set(BIN_INSTALL_DIR "bin" CACHE PATH "Path relative to CMAKE_INSTALL_PREFIX where to install binaries/DLL")
|
|
59
59
|
set(LIB_INSTALL_DIR "lib" CACHE PATH "Path relative to CMAKE_INSTALL_PREFIX where to install libraries")
|
|
@@ -147,10 +147,11 @@ endif()
|
|
|
147
147
|
|
|
148
148
|
set(CARGO_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR}/cargo-target)
|
|
149
149
|
set(CARGO_BUILD_ARG "${CARGO_BUILD_ARG};--target-dir=${CARGO_TARGET_DIR}")
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
# The C ABI (src/ffi.rs) is only compiled with the capi feature.
|
|
151
|
+
set(_cargo_features "capi ${READCON_DB_CARGO_FEATURES}")
|
|
152
|
+
string(STRIP "${_cargo_features}" _cargo_features)
|
|
153
|
+
string(REPLACE " " "," _feats "${_cargo_features}")
|
|
154
|
+
set(CARGO_BUILD_ARG "${CARGO_BUILD_ARG};--features=${_feats}")
|
|
154
155
|
|
|
155
156
|
if ("${RUST_BUILD_TARGET}" STREQUAL "")
|
|
156
157
|
if (CARGO_VERSION_RAW MATCHES "host: ([a-zA-Z0-9_\\-]*)\n")
|
|
@@ -122,6 +122,15 @@ dependencies = [
|
|
|
122
122
|
"libloading",
|
|
123
123
|
]
|
|
124
124
|
|
|
125
|
+
[[package]]
|
|
126
|
+
name = "cmake"
|
|
127
|
+
version = "0.1.58"
|
|
128
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
129
|
+
checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678"
|
|
130
|
+
dependencies = [
|
|
131
|
+
"cc",
|
|
132
|
+
]
|
|
133
|
+
|
|
125
134
|
[[package]]
|
|
126
135
|
name = "conv"
|
|
127
136
|
version = "0.3.3"
|
|
@@ -180,6 +189,12 @@ dependencies = [
|
|
|
180
189
|
"typenum",
|
|
181
190
|
]
|
|
182
191
|
|
|
192
|
+
[[package]]
|
|
193
|
+
name = "cty"
|
|
194
|
+
version = "0.2.2"
|
|
195
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
196
|
+
checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35"
|
|
197
|
+
|
|
183
198
|
[[package]]
|
|
184
199
|
name = "custom_derive"
|
|
185
200
|
version = "0.1.7"
|
|
@@ -267,6 +282,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
267
282
|
checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
|
|
268
283
|
dependencies = [
|
|
269
284
|
"crc32fast",
|
|
285
|
+
"libz-ng-sys",
|
|
270
286
|
"miniz_oxide",
|
|
271
287
|
]
|
|
272
288
|
|
|
@@ -510,6 +526,26 @@ dependencies = [
|
|
|
510
526
|
"windows-link",
|
|
511
527
|
]
|
|
512
528
|
|
|
529
|
+
[[package]]
|
|
530
|
+
name = "libmimalloc-sys"
|
|
531
|
+
version = "0.1.49"
|
|
532
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
533
|
+
checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9"
|
|
534
|
+
dependencies = [
|
|
535
|
+
"cc",
|
|
536
|
+
"cty",
|
|
537
|
+
]
|
|
538
|
+
|
|
539
|
+
[[package]]
|
|
540
|
+
name = "libz-ng-sys"
|
|
541
|
+
version = "1.1.33"
|
|
542
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
543
|
+
checksum = "922f69da893772fd14ea9118138d1111f89830a9753438ddf69987f24600cb63"
|
|
544
|
+
dependencies = [
|
|
545
|
+
"cmake",
|
|
546
|
+
"libc",
|
|
547
|
+
]
|
|
548
|
+
|
|
513
549
|
[[package]]
|
|
514
550
|
name = "linux-raw-sys"
|
|
515
551
|
version = "0.12.1"
|
|
@@ -558,6 +594,15 @@ dependencies = [
|
|
|
558
594
|
"libc",
|
|
559
595
|
]
|
|
560
596
|
|
|
597
|
+
[[package]]
|
|
598
|
+
name = "mimalloc"
|
|
599
|
+
version = "0.1.52"
|
|
600
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
601
|
+
checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862"
|
|
602
|
+
dependencies = [
|
|
603
|
+
"libmimalloc-sys",
|
|
604
|
+
]
|
|
605
|
+
|
|
561
606
|
[[package]]
|
|
562
607
|
name = "minimal-lexical"
|
|
563
608
|
version = "0.2.1"
|
|
@@ -651,6 +696,15 @@ dependencies = [
|
|
|
651
696
|
"autocfg",
|
|
652
697
|
]
|
|
653
698
|
|
|
699
|
+
[[package]]
|
|
700
|
+
name = "object"
|
|
701
|
+
version = "0.36.7"
|
|
702
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
703
|
+
checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
|
|
704
|
+
dependencies = [
|
|
705
|
+
"memchr",
|
|
706
|
+
]
|
|
707
|
+
|
|
654
708
|
[[package]]
|
|
655
709
|
name = "once_cell"
|
|
656
710
|
version = "1.21.4"
|
|
@@ -850,9 +904,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|
|
850
904
|
|
|
851
905
|
[[package]]
|
|
852
906
|
name = "readcon-core"
|
|
853
|
-
version = "0.
|
|
907
|
+
version = "0.23.2"
|
|
854
908
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
855
|
-
checksum = "
|
|
909
|
+
checksum = "87c32a8afef74ec96ed1a8e09e5f4ae56ae3cd982791d438a23b51eeeddce6c8"
|
|
856
910
|
dependencies = [
|
|
857
911
|
"dlpk",
|
|
858
912
|
"fast-float2",
|
|
@@ -861,6 +915,7 @@ dependencies = [
|
|
|
861
915
|
"libc",
|
|
862
916
|
"memchr",
|
|
863
917
|
"memmap2",
|
|
918
|
+
"mimalloc",
|
|
864
919
|
"ndarray",
|
|
865
920
|
"rustc-hash",
|
|
866
921
|
"ryu",
|
|
@@ -869,11 +924,13 @@ dependencies = [
|
|
|
869
924
|
|
|
870
925
|
[[package]]
|
|
871
926
|
name = "readcon-db"
|
|
872
|
-
version = "0.2.
|
|
927
|
+
version = "0.2.4"
|
|
873
928
|
dependencies = [
|
|
874
929
|
"heed",
|
|
875
930
|
"libc",
|
|
931
|
+
"mimalloc",
|
|
876
932
|
"mpi",
|
|
933
|
+
"object",
|
|
877
934
|
"pyo3",
|
|
878
935
|
"readcon-core",
|
|
879
936
|
"serde",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "readcon-db"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.4"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
description = "Mmap-backed CON frame corpus (Heed/LMDB), xxHash exact match, multi-language FFI"
|
|
6
6
|
license = "MIT"
|
|
@@ -19,6 +19,9 @@ crate-type = ["lib", "cdylib", "staticlib"]
|
|
|
19
19
|
[features]
|
|
20
20
|
default = []
|
|
21
21
|
python = ["dep:pyo3"]
|
|
22
|
+
# Compiles the C ABI (src/ffi.rs and the rkrdb_* exports in src/archive.rs
|
|
23
|
+
# and src/mpi_ingest.rs). Off by default so Rust consumers do not export
|
|
24
|
+
# unmangled rkrdb_* symbols. C, Fortran and cargo-c builds must enable it.
|
|
22
25
|
capi = []
|
|
23
26
|
# Parallel ingest over a caller-supplied communicator (rsmpi). Needs an MPI
|
|
24
27
|
# implementation and libclang at build time. See src/mpi_ingest.rs.
|
|
@@ -27,7 +30,15 @@ mpi = ["dep:mpi"]
|
|
|
27
30
|
[dependencies]
|
|
28
31
|
heed = "0.21"
|
|
29
32
|
# The pinned writer provides exact numeric CON and JSON round trips.
|
|
30
|
-
readcon-core = "=0.
|
|
33
|
+
readcon-core = "=0.23.2"
|
|
34
|
+
# readcon-core installs mimalloc as the global allocator and has no
|
|
35
|
+
# feature to turn that off. The C objects default to initial-exec TLS,
|
|
36
|
+
# which sets DF_STATIC_TLS on this cdylib. Cargo unifies
|
|
37
|
+
# local_dynamic_tls onto that same mimalloc.
|
|
38
|
+
mimalloc = { version = "0.1.43", default-features = false, features = [
|
|
39
|
+
"extended",
|
|
40
|
+
"local_dynamic_tls",
|
|
41
|
+
] }
|
|
31
42
|
thiserror = "2"
|
|
32
43
|
serde = { version = "1", features = ["derive"] }
|
|
33
44
|
serde_json = "1"
|
|
@@ -41,10 +52,20 @@ mpi = { version = "0.8", optional = true, default-features = false }
|
|
|
41
52
|
tempfile = "3"
|
|
42
53
|
sha2 = "0.10"
|
|
43
54
|
libc = "0.2"
|
|
55
|
+
object = { version = "0.36", default-features = false, features = [
|
|
56
|
+
"read_core",
|
|
57
|
+
"archive",
|
|
58
|
+
"elf",
|
|
59
|
+
"macho",
|
|
60
|
+
"pe",
|
|
61
|
+
"coff",
|
|
62
|
+
] }
|
|
44
63
|
|
|
45
64
|
[package.metadata.docs.rs]
|
|
46
65
|
all-features = false
|
|
47
66
|
|
|
67
|
+
# cargo-c has no per-package default features: run
|
|
68
|
+
# `cargo cbuild --features capi` / `cargo cinstall --features capi`.
|
|
48
69
|
[package.metadata.capi]
|
|
49
70
|
min_version = "0.10.17"
|
|
50
71
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: readcon-db
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Mmap CON corpus store (LMDB/Heed) with xxHash exact match
|
|
5
5
|
Home-Page: https://lode-org.github.io/readcon-db/
|
|
6
6
|
License: MIT
|
|
@@ -39,11 +39,16 @@ Docs: <https://lode-org.github.io/readcon-db/> · crate: <https://crates.io/crat
|
|
|
39
39
|
|
|
40
40
|
## Quick start (from source)
|
|
41
41
|
|
|
42
|
+
Outside Windows a source build also needs CMake: readcon-core links
|
|
43
|
+
zlib-ng, which `libz-ng-sys` builds with CMake.
|
|
44
|
+
|
|
42
45
|
```bash
|
|
43
46
|
git clone https://github.com/lode-org/readcon-db
|
|
44
47
|
cd readcon-db
|
|
45
48
|
cargo test --locked
|
|
46
|
-
cargo
|
|
49
|
+
cargo test --locked --features capi
|
|
50
|
+
cargo build --release # CLI readcon-db; no C symbols
|
|
51
|
+
cargo build --release --features capi # libreadcon_db with the C ABI
|
|
47
52
|
```
|
|
48
53
|
|
|
49
54
|
Optional LODE sibling checkout (edit core + db together): clone both under the same parent, then create **untracked** `.cargo/config.toml` in `readcon-db`:
|
|
@@ -26,11 +26,16 @@ Docs: <https://lode-org.github.io/readcon-db/> · crate: <https://crates.io/crat
|
|
|
26
26
|
|
|
27
27
|
## Quick start (from source)
|
|
28
28
|
|
|
29
|
+
Outside Windows a source build also needs CMake: readcon-core links
|
|
30
|
+
zlib-ng, which `libz-ng-sys` builds with CMake.
|
|
31
|
+
|
|
29
32
|
```bash
|
|
30
33
|
git clone https://github.com/lode-org/readcon-db
|
|
31
34
|
cd readcon-db
|
|
32
35
|
cargo test --locked
|
|
33
|
-
cargo
|
|
36
|
+
cargo test --locked --features capi
|
|
37
|
+
cargo build --release # CLI readcon-db; no C symbols
|
|
38
|
+
cargo build --release --features capi # libreadcon_db with the C ABI
|
|
34
39
|
```
|
|
35
40
|
|
|
36
41
|
Optional LODE sibling checkout (edit core + db together): clone both under the same parent, then create **untracked** `.cargo/config.toml` in `readcon-db`:
|
|
@@ -66,7 +66,7 @@ See @@rst::doc:`/cooked-soa`@@.
|
|
|
66
66
|
:PROPERTIES:
|
|
67
67
|
:CUSTOM_ID: ingest-path
|
|
68
68
|
:END:
|
|
69
|
-
1. Path / CON text: =ConFrameIterator::next_with_raw_span=
|
|
69
|
+
1. Path / CON text: =ConFrameIterator::next_with_raw_span= for append and for extend of a file or string. In-memory frames and a units stamp use the round-trip writer. An older six-decimal row is left as stored.
|
|
70
70
|
2. *In-memory* =append_trajectory_frames= / =extend_trajectory_frames= for chemfiles → corpus.
|
|
71
71
|
3. Parse once for indexes (natoms, symbols, composition, energy, fmax, flags).
|
|
72
72
|
4. Store blob; compute *xxHash3-128*; update secondary B-trees.
|
|
@@ -72,6 +72,10 @@ Formula encoding: sorted non-empty symbols, =Sym:count= joined by =|= (e.g. =Cu
|
|
|
72
72
|
2. *In-memory frames* (=append_trajectory_frames= / =extend_trajectory_frames=) for chemfiles → =ConFrame= → corpus without a temp file. Python: =append_trajectory_str= / =append_trajectory_frames=. C: =rkrdb_append_trajectory_str= / =rkrdb_append_trajectory_frame= (=RKRConFrame*=).
|
|
73
73
|
3. Directory ingest (=ingest_directory=).
|
|
74
74
|
|
|
75
|
+
=extend_trajectory_str= and =extend_trajectory_path= (no units stamp) store those same raw spans. Python =extend_trajectory= and C =rkrdb_extend_trajectory= are that path. A units stamp, and in-memory =extend_trajectory_frames=, write with readcon-core =FloatFormat::RoundTrip= because the original text is gone.
|
|
76
|
+
|
|
77
|
+
Stores already written at six decimal places are not migrated. Open and a later extend leave those rows byte for byte. A resume that hashes the original high-precision file misses and starts a new trajectory. A resume that hashes the stored six-decimal text hits the same trajectory when that text still parses. A mass near =1e-9= written at six decimals can become =0.000000=, which fails mass validation, so that stored spelling does not resume.
|
|
78
|
+
|
|
75
79
|
** Reindex
|
|
76
80
|
:PROPERTIES:
|
|
77
81
|
:CUSTOM_ID: reindex
|
|
@@ -35,10 +35,13 @@ Install [[https://pypi.org/project/readcon/][readcon]] (core) as well when you n
|
|
|
35
35
|
git clone https://github.com/lode-org/readcon-db
|
|
36
36
|
cd readcon-db
|
|
37
37
|
cargo test --locked
|
|
38
|
-
cargo
|
|
38
|
+
cargo test --locked --features capi
|
|
39
|
+
cargo build --release # CLI readcon-db; no C symbols
|
|
40
|
+
cargo build --release --features capi # libreadcon_db with the C ABI
|
|
39
41
|
#+end_src
|
|
40
42
|
|
|
41
43
|
=readcon-core= comes from crates.io (~{{{readcon-core-req}}}~).
|
|
44
|
+
A build from source, including =cargo install=, the Python sdist and the cxx tarball, needs CMake outside Windows: readcon-core links zlib-ng, which =libz-ng-sys= builds with CMake.
|
|
42
45
|
Add an *untracked* =.cargo/config.toml= with the patch below to build against a local core tree.
|
|
43
46
|
|
|
44
47
|
#+begin_src toml
|
|
@@ -57,6 +60,8 @@ maturin develop --release --features python --manifest-path python/pyproject.tom
|
|
|
57
60
|
:PROPERTIES:
|
|
58
61
|
:CUSTOM_ID: c-c-no-cbindgen
|
|
59
62
|
:END:
|
|
63
|
+
The C ABI (=rkrdb_*=) is compiled only with the =capi= cargo feature, which is off by default so that Rust consumers do not export unmangled =rkrdb_*= symbols. The CMake and Meson builds, =scripts/package-clib.sh= and the clib tarball enable =capi= for you. A plain =cargo build --features capi=, or =cargo cbuild --features capi= with cargo-c, is needed when you drive cargo yourself. =READCON_DB_CARGO_FEATURES= (CMake) and =-Dcargo_features= (Meson) add features on top of =capi=.
|
|
64
|
+
|
|
60
65
|
=include/readcon-db.h= is hand-written and shipped. Optional =include/readcon-db-mpi.h= takes the caller's =MPI_Comm= (not linked into the library). CMake FetchContent, Meson wrap, and =pkg-config= do *not* run cbindgen.
|
|
61
66
|
|
|
62
67
|
CMake:
|
|
@@ -103,7 +108,7 @@ export READCON_DB_LIB="$PREFIX/lib/libreadcon_db.so"
|
|
|
103
108
|
pkg-config --cflags --libs readcon-db
|
|
104
109
|
#+end_src
|
|
105
110
|
|
|
106
|
-
The cxx tarball still needs rustc/cargo. The clib tarball is the Fortran / C path that does not.
|
|
111
|
+
The cxx tarball still needs rustc/cargo, and CMake outside Windows. The clib tarball is the Fortran / C path that does not.
|
|
107
112
|
|
|
108
113
|
** Fortran
|
|
109
114
|
:PROPERTIES:
|
|
@@ -117,7 +122,7 @@ fpm build --flag "$(pkg-config --cflags readcon-db)" \
|
|
|
117
122
|
--link-flag "$(pkg-config --libs readcon-db) -ldl -lpthread -lm"
|
|
118
123
|
#+end_src
|
|
119
124
|
|
|
120
|
-
From a checkout (after
|
|
125
|
+
From a checkout (after =cargo build --release --features capi=):
|
|
121
126
|
|
|
122
127
|
#+begin_src sh
|
|
123
128
|
cd fortran/ReadConDb && fpm build --flag "-I../../include" \
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:PROPERTIES:
|
|
5
5
|
:CUSTOM_ID: mpi-ingest-and-export
|
|
6
6
|
:END:
|
|
7
|
-
Build with =--features mpi= against one MPI implementation (=MPICC=mpicc.mpich= or =mpicc.openmpi=). The library never calls =MPI_Init= and only uses the communicator you pass.
|
|
7
|
+
Build with =--features mpi= against one MPI implementation (=MPICC=mpicc.mpich= or =mpicc.openmpi=). The library never calls =MPI_Init= and only uses the communicator you pass. The C and Fortran entry point =rkrdb_mpi_ingest_paths_f= also needs the =capi= feature (=--features mpi,capi=).
|
|
8
8
|
|
|
9
9
|
** Ingest
|
|
10
10
|
:PROPERTIES:
|
|
@@ -34,8 +34,20 @@ Rust is =ConCorpus::open= and =ConCorpus::open_readonly=. The command line is =r
|
|
|
34
34
|
:END:
|
|
35
35
|
=append_trajectory_frames= commits 64 frames at a time. The first group is a new trajectory. Each later group extends it. A list returned by =read_con= is written from the frames the parser already stored, so the append does not build a Python atom for every site.
|
|
36
36
|
|
|
37
|
+
Each group of CON text from =readcon.write_con_string= is parsed by readcon-db and stored with readcon-core =FloatFormat::RoundTrip=, so every finite value reads back as the same binary64 and the stored spelling does not depend on the default writer of the installed =readcon= wheel. =ConCorpus.hash_con_text= of the stored text equals =frame_hash=.
|
|
38
|
+
|
|
37
39
|
Rust =ConCorpus::append_trajectory_frames= still commits the slice you pass in one transaction. The grouping is the Python binding.
|
|
38
40
|
|
|
41
|
+
** Extend a live trajectory
|
|
42
|
+
:PROPERTIES:
|
|
43
|
+
:CUSTOM_ID: extend-a-live-trajectory
|
|
44
|
+
:END:
|
|
45
|
+
Python =extend_trajectory=, C =rkrdb_extend_trajectory=, and Rust =extend_trajectory_str= / =extend_trajectory_path= append the file's own frame text. The content hash is the xxh3-128 of that text, so a later open of the same file finds the same generation.
|
|
46
|
+
|
|
47
|
+
To look a file up before a resume, hash it with Rust =ConCorpus::hash_con_text=, Python =ConCorpus.hash_con_text=, C =rkrdb_hash_con_text=, Fortran =db_hash_con_text=, or =readcon-db hash-file <file.con>=. All of them hash the first frame's source span as written, the same bytes the store hashed, and the result goes to =find_by_hash=.
|
|
48
|
+
|
|
49
|
+
A corpus written by an older extend stored those frames at six decimal places. Opening it does not rewrite the rows. Resuming from the original file misses those hashes and starts a new trajectory. Resuming from the stored six-decimal text hits when that text still parses. A mass near =1e-9= can round to =0.000000= and then fail to parse.
|
|
50
|
+
|
|
39
51
|
** Random access
|
|
40
52
|
:PROPERTIES:
|
|
41
53
|
:CUSTOM_ID: random-access
|
|
@@ -14,13 +14,13 @@ Header: [[https://github.com/lode-org/readcon-db/blob/main/include/readcon-db.h]
|
|
|
14
14
|
|
|
15
15
|
#+begin_src C
|
|
16
16
|
#define RKRDB_ABI_VERSION_MAJOR 1
|
|
17
|
-
#define RKRDB_ABI_VERSION_MINOR
|
|
17
|
+
#define RKRDB_ABI_VERSION_MINOR 3
|
|
18
18
|
#define RKRDB_ABI_LAYOUT_REVISION 1
|
|
19
19
|
|
|
20
20
|
uint32_t rkrdb_abi_version_major(void);
|
|
21
21
|
uint32_t rkrdb_abi_version_minor(void);
|
|
22
22
|
uint32_t rkrdb_abi_layout_revision(void);
|
|
23
|
-
const char *rkrdb_abi_stamp(void); /* "readcon-db/abi-1.
|
|
23
|
+
const char *rkrdb_abi_stamp(void); /* "readcon-db/abi-1.3/layout-1" */
|
|
24
24
|
int rkrdb_abi_compatible(uint32_t major, uint32_t minor, uint32_t layout_revision);
|
|
25
25
|
#+end_src
|
|
26
26
|
|
|
@@ -35,7 +35,7 @@ if (!rkrdb_abi_compatible(RKRDB_ABI_VERSION_MAJOR, RKRDB_ABI_VERSION_MINOR,
|
|
|
35
35
|
}
|
|
36
36
|
#+end_src
|
|
37
37
|
|
|
38
|
-
The numbers live in =src/ffi.rs= and are repeated in =include/readcon-db.h=, which is hand-written. The =abi_header_carries_the_stamp= unit test fails when the two disagree. They do not follow the package version, and a release that changes no exported symbol leaves them where they are.
|
|
38
|
+
The numbers live in =src/ffi.rs= (compiled with the =capi= feature) and are repeated in =include/readcon-db.h=, which is hand-written. The =abi_header_carries_the_stamp= unit test fails when the two disagree. They do not follow the package version, and a release that changes no exported symbol leaves them where they are.
|
|
39
39
|
|
|
40
40
|
- =RKRDB_ABI_VERSION_MAJOR=: increment for a change an old caller cannot survive: removing or renaming an exported function, changing a signature, or changing the meaning of an argument or status code. Reset the minor to 0.
|
|
41
41
|
- =RKRDB_ABI_VERSION_MINOR=: increment for an additive change that leaves every old call valid, such as a new exported function or a new status code.
|
|
@@ -85,6 +85,9 @@ rkrdb_result_key(id, 0, &traj, &frame);
|
|
|
85
85
|
uint8_t hash[16];
|
|
86
86
|
rkrdb_frame_hash(id, traj, frame, hash);
|
|
87
87
|
rkrdb_select_hash(id, hash);
|
|
88
|
+
/* text, len: a CON file read into memory */
|
|
89
|
+
rkrdb_hash_con_text(text, len, hash); /* first frame, as the corpus stores it */
|
|
90
|
+
rkrdb_select_hash(id, hash);
|
|
88
91
|
rkrdb_close(id);
|
|
89
92
|
rkrdb_open_readonly("/tmp/corpus", &id);
|
|
90
93
|
rkrdb_close(id);
|
|
@@ -92,9 +95,13 @@ rkrdb_close(id);
|
|
|
92
95
|
|
|
93
96
|
Status: =RKRDB_OK= (0), =RKRDB_ERR= (-1), =RKRDB_NOT_FOUND= (-2), =RKRDB_NULL= (-3).
|
|
94
97
|
|
|
98
|
+
=rkrdb_hash_con_text= hashes the first frame's source span in =len= bytes of CON text, the bytes =rkrdb_append_trajectory=, =rkrdb_append_trajectory_str= and =rkrdb_extend_trajectory= store for it. It is the hash =readcon-db hash-file= prints. It does not parse and rewrite the frame, so a high-precision file finds its stored frame. =rkrdb_xxh3_128= hashes whatever bytes it is given. Added in ABI 1.2.
|
|
99
|
+
|
|
100
|
+
=rkrdb_get_frame= returns a parsed frame allocated in =libreadcon_db=. Free that pointer with =rkrdb_free_frame=. A null pointer is a no-op. =free_rkr_frame= in =libreadcon_core= frees with that library's allocator, and each shared library has its own copy, so it is not the matching free. Added in ABI 1.3.
|
|
101
|
+
|
|
95
102
|
=rkrdb_h5md_*= returns =RKRDB_NULL= for an invalid handle. A collect failure returns =RKRDB_ERR= and leaves the message in =rkrdb_last_error=. =rkrdb_set_units= returns that missing-=units.time= error for a v3.1 clock or velocities frame instead of assuming =fs=. v1, v2, and v3.0 clocks with no =units.time= still convert as =fs=. H5MD velocities follow D10 and are written as =Angstrom ps-1=. v1, v2, and v3.0 frames use =(amu*angstrom^2/eV)^0.5= whatever the time label says. v3.1 frames use =units.time= and fail when a velocities section has no =units.time=. =rkrdb_set_velocity_time_unit= (C++ =Corpus::set_velocity_time_unit=) overrides that rule for a file that breaks it. Pass =fs= when the file really stored Angstrom/fs. The simulation clock uses =units.time= when that key is present. A v3.1 frame with =time= or =timestep= and no =units.time= is an error, and the same override supplies that missing clock unit. A present =units.time= still scales the clock. v1, v2, and v3.0 clocks with no =units.time= are read as =fs=.
|
|
96
103
|
|
|
97
|
-
Link =libreadcon_db= from =cargo build --release= (=cdylib= / =staticlib=), or unpack the prebuilt =readcon-db-clib-$VERSION-$target.tar.gz= Release asset and =pkg-config --libs readcon-db=. See @@rst::doc:`/howto/install`@@.
|
|
104
|
+
Link =libreadcon_db= from =cargo build --release --features capi= (=cdylib= / =staticlib=), or unpack the prebuilt =readcon-db-clib-$VERSION-$target.tar.gz= Release asset and =pkg-config --libs readcon-db=. Without =capi= the library exports no =rkrdb_*= symbols. See @@rst::doc:`/howto/install`@@.
|
|
98
105
|
|
|
99
106
|
C++ RAII:
|
|
100
107
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:END:
|
|
7
7
|
Module: =fortran/ReadConDb/src/readcon_db.f90= (=bind(C)= to =rkrdb_*=).
|
|
8
8
|
|
|
9
|
-
Link =libreadcon_db= from a checkout (=cargo build --release=) or from the prebuilt =readcon-db-clib-$VERSION-$target.tar.gz= Release asset (no local cargo). See @@rst::doc:`/howto/install`@@ and =fortran/README.md=.
|
|
9
|
+
Link =libreadcon_db= from a checkout (=cargo build --release --features capi=) or from the prebuilt =readcon-db-clib-$VERSION-$target.tar.gz= Release asset (no local cargo). See @@rst::doc:`/howto/install`@@ and =fortran/README.md=.
|
|
10
10
|
|
|
11
11
|
#+begin_src fortran
|
|
12
12
|
use readcon_db
|
|
@@ -22,7 +22,7 @@ call db_extend_units(id, 1_c_int64_t, "more.con", &
|
|
|
22
22
|
call db_select_basic(id, 1_c_int64_t, "Cu", 1, 100000, 0, status)
|
|
23
23
|
#+end_src
|
|
24
24
|
|
|
25
|
-
See helpers =db_open=, =db_append=, =db_select_basic=, =db_result_count=, =db_result_key=, =db_frame_hash=, =db_xxh3_128= in the module source. Point your build system at =include/= for the C header if needed and =target/release/= (or the clib prefix =lib/= + =PKG_CONFIG_PATH=). Campaign shard/drain/join is the CLI; a Fortran rank that owns one shard opens =root/shard_XXXX= with =db_open= (@@rst::doc:`/howto/campaign`@@).
|
|
25
|
+
See helpers =db_open=, =db_append=, =db_select_basic=, =db_result_count=, =db_result_key=, =db_frame_hash=, =db_xxh3_128=, =db_hash_con_text= in the module source. =db_get_frame= returns a frame allocated in =libreadcon_db=; free it with =db_free_frame=. =db_hash_con_text= hashes the first frame of CON text the way the corpus stored it, so it matches =db_frame_hash= for a file appended or extended from its path. Point your build system at =include/= for the C header if needed and =target/release/= (or the clib prefix =lib/= + =PKG_CONFIG_PATH=). Campaign shard/drain/join is the CLI; a Fortran rank that owns one shard opens =root/shard_XXXX= with =db_open= (@@rst::doc:`/howto/campaign`@@).
|
|
26
26
|
|
|
27
27
|
** MPI: pack on root, Bcast on the caller INTEGER communicator
|
|
28
28
|
:PROPERTIES:
|
|
@@ -37,6 +37,7 @@ hits = db.find_by_atom_order_path("product.con")
|
|
|
37
37
|
# hits[0].permutation[i] is the query index of stored atom i
|
|
38
38
|
text = db.get_frame_text(1, 0)
|
|
39
39
|
raw = ConCorpus.xxh3_128(b"blob")
|
|
40
|
+
h = ConCorpus.hash_con_text(Path("run.con").read_text()) # == db.frame_hash(1, 0)
|
|
40
41
|
frame = db.get_frame(1, 0) # StoredFrame, not a readcon.ConFrame
|
|
41
42
|
#+end_src
|
|
42
43
|
|
|
@@ -96,6 +96,10 @@ ShardedConCorpus::drain_to(src, dest)?;
|
|
|
96
96
|
join_drained_roots(&[dest_a, dest_b], joined)?;
|
|
97
97
|
#+end_src
|
|
98
98
|
|
|
99
|
+
=extend_trajectory_str= and =extend_trajectory_path= keep the source spans. =append_trajectory_frames=, =extend_trajectory_frames= and a units-stamped path write with =FloatFormat::RoundTrip=. =append_trajectory_frames_with_float_format= and =extend_trajectory_frames_with_float_format= take the format. An older six-decimal row is not rewritten on open or on a later extend. A resume of the original spelling misses. A resume of the stored spelling hits when that text still parses.
|
|
100
|
+
|
|
101
|
+
=ConCorpus::hash_con_text= and =readcon-db hash-file <file.con>= hash the first frame's source span, the bytes =append_trajectory_str= and =extend_trajectory_str= store and hash. The text is not parsed and written back first, so a high-precision file gives the stored hash and =find_by_hash= finds its trajectory.
|
|
102
|
+
|
|
99
103
|
=set_trajectory_units= converts stored numbers. A v3.1 clock or velocities frame with no =units.time= is an error, not a silent =fs=; v1, v2, and v3.0 clocks with no =units.time= still convert as =fs=. =append_trajectory_path_units= and =extend_trajectory_path_units= stamp incoming frames. H5MD velocities follow D10 and are written as =Angstrom ps-1=. v1, v2, and v3.0 frames use =(amu*angstrom^2/eV)^0.5= whatever the time label says. v3.1 frames use =units.time= and =collect_h5md= fails when velocities have no =units.time=. =H5mdCollectOpts.velocity_time_unit= overrides that rule for a file that breaks it. The clock (=time=, =timestep=, H5MD time) uses =units.time= when that key is present. A v3.1 frame with =time= or =timestep= and no =units.time= is an error, and the same override supplies that missing clock unit. A present =units.time= still scales the clock. v1, v2, and v3.0 clocks with no =units.time= are read as =fs=.
|
|
100
104
|
|
|
101
105
|
** Cooked SoA (RCSO)
|
|
@@ -34,7 +34,7 @@ objects (`libreadcon_db.so` and `libreadcon_core.so`). Do not static-link
|
|
|
34
34
|
## From a checkout
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
cargo build --release
|
|
37
|
+
cargo build --release --features capi
|
|
38
38
|
cd fortran/ReadConDb
|
|
39
39
|
fpm build --flag "-I../../include" \
|
|
40
40
|
--link-flag "-L../../target/release -lreadcon_db -ldl -lpthread -lm"
|
|
@@ -5,7 +5,8 @@ module readcon_db
|
|
|
5
5
|
public :: rkrdb_ok, rkrdb_err, rkrdb_not_found, db_open, db_open_readonly, db_close, db_append, db_append_units, &
|
|
6
6
|
db_extend, db_extend_units, db_select_basic, &
|
|
7
7
|
db_result_count, db_result_key, db_frame_hash, db_frame_formula, db_xxh3_128, &
|
|
8
|
-
|
|
8
|
+
db_hash_con_text, &
|
|
9
|
+
db_get_frame, db_free_frame, db_pack_frame, db_pack_frames, db_unpack_positions, &
|
|
9
10
|
db_unpack_batch_nframes, db_unpack_batch_item, db_set_units, db_frame_units, &
|
|
10
11
|
db_h5md_times, db_h5md_shape, db_h5md_positions, db_h5md_edges, &
|
|
11
12
|
db_h5md_forces, db_h5md_velocities, db_h5md_species, &
|
|
@@ -254,6 +255,13 @@ module readcon_db
|
|
|
254
255
|
integer(c_int8_t), intent(out) :: out_hash(*)
|
|
255
256
|
integer(c_int) :: st
|
|
256
257
|
end function
|
|
258
|
+
function rkrdb_hash_con_text(text, n, out_hash) bind(C, name="rkrdb_hash_con_text") result(st)
|
|
259
|
+
import :: c_char, c_int, c_size_t, c_int8_t
|
|
260
|
+
character(kind=c_char), intent(in) :: text(*)
|
|
261
|
+
integer(c_size_t), value :: n
|
|
262
|
+
integer(c_int8_t), intent(out) :: out_hash(*)
|
|
263
|
+
integer(c_int) :: st
|
|
264
|
+
end function
|
|
257
265
|
function rkrdb_get_frame(id, traj_id, frame_idx) bind(C, name="rkrdb_get_frame") result(p)
|
|
258
266
|
import :: c_size_t, c_int64_t, c_int32_t, c_ptr
|
|
259
267
|
integer(c_size_t), value :: id
|
|
@@ -261,6 +269,10 @@ module readcon_db
|
|
|
261
269
|
integer(c_int32_t), value :: frame_idx
|
|
262
270
|
type(c_ptr) :: p
|
|
263
271
|
end function
|
|
272
|
+
subroutine rkrdb_free_frame(frame) bind(C, name="rkrdb_free_frame")
|
|
273
|
+
import :: c_ptr
|
|
274
|
+
type(c_ptr), value :: frame
|
|
275
|
+
end subroutine
|
|
264
276
|
function rkrdb_frame_formula(id, traj_id, frame_idx, buf, buflen) bind(C, name="rkrdb_frame_formula") result(st)
|
|
265
277
|
import :: c_int, c_size_t, c_int64_t, c_int32_t, c_char
|
|
266
278
|
integer(c_size_t), value :: id
|
|
@@ -630,6 +642,13 @@ contains
|
|
|
630
642
|
status = rkrdb_xxh3_128(data, n, hash16)
|
|
631
643
|
end subroutine
|
|
632
644
|
|
|
645
|
+
subroutine db_hash_con_text(text, hash16, status)
|
|
646
|
+
character(len=*), intent(in) :: text
|
|
647
|
+
integer(c_int8_t), intent(out) :: hash16(16)
|
|
648
|
+
integer(c_int), intent(out) :: status
|
|
649
|
+
status = rkrdb_hash_con_text(text, int(len(text), c_size_t), hash16)
|
|
650
|
+
end subroutine
|
|
651
|
+
|
|
633
652
|
subroutine db_frame_formula(id, traj_id, frame_idx, formula, status)
|
|
634
653
|
integer(c_size_t), intent(in) :: id
|
|
635
654
|
integer(c_int64_t), intent(in) :: traj_id
|
|
@@ -685,7 +704,7 @@ contains
|
|
|
685
704
|
end subroutine
|
|
686
705
|
|
|
687
706
|
function db_get_frame(id, traj_id, frame_idx) result(p)
|
|
688
|
-
!
|
|
707
|
+
! ConFrame* allocated in libreadcon_db. Free with db_free_frame.
|
|
689
708
|
integer(c_size_t), intent(in) :: id
|
|
690
709
|
integer(c_int64_t), intent(in) :: traj_id
|
|
691
710
|
integer(c_int32_t), intent(in) :: frame_idx
|
|
@@ -693,6 +712,11 @@ contains
|
|
|
693
712
|
p = rkrdb_get_frame(id, traj_id, frame_idx)
|
|
694
713
|
end function
|
|
695
714
|
|
|
715
|
+
subroutine db_free_frame(frame)
|
|
716
|
+
type(c_ptr), intent(in) :: frame
|
|
717
|
+
call rkrdb_free_frame(frame)
|
|
718
|
+
end subroutine
|
|
719
|
+
|
|
696
720
|
subroutine db_recook_all(id, status)
|
|
697
721
|
integer(c_size_t), intent(in) :: id
|
|
698
722
|
integer(c_int), intent(out) :: status
|
|
@@ -221,7 +221,7 @@ static inline int rkrdb_bcast_packed_frames_f(MPI_Fint comm_f, int root,
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
/*
|
|
224
|
-
* Exported by libreadcon_db built with the `mpi`
|
|
224
|
+
* Exported by libreadcon_db built with the `mpi` and `capi` features (Rust side takes
|
|
225
225
|
* the Fortran handle so the library does not hard-link one MPI ABI).
|
|
226
226
|
* Collective parallel ingest of `n_files` CON files in order. With
|
|
227
227
|
* `n_shards == 0` rank 0 writes the single corpus at `dir`; otherwise
|