Repository navigation
ck-libs/cache: CkTreeCacheManager, a process-shared tree-node cache with CkCache's protocol - #4013
Merged
Merged
Conversation
ritvikrao
approved these changes
Sep 29, 2026
Contributor
Author
|
The same commit for |
…ache's protocol A nodegroup (one branch per process, shared lock-free by its PEs) that offers CkCacheManager's request/reply protocol and member names for caches whose entries are the nodes of a tree, backed by paratreet2's TreeCacheCore over the application's own process-shared tree, reached through a Traits parameter. Missing children become placeholder nodes; requestors park on them; a reply (cache line) is built fully and then published with one atomic child-pointer exchange, delivering the parked requestors exactly once. Chunk teardown is process-wide (the location managers of every PE of the node are counted). First client: ChaNGa's node cache. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lvkale
force-pushed
the
treecache-nodecache-main
branch
from
October 5, 2026 14:30
ff1a531 to
da0c95a
Compare
adityapb
approved these changes
Oct 5, 2026
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.
Adds
CkTreeCacheManager<Key, Traits>tock-libs/cache, besideCkCacheManager. It keeps CkCache's request/reply protocol (requestData, recvData, chunk finish) but stores fetched tree nodes once per process instead of once per PE: one process-shared store owned by the rank-0 branch, lock-free on the fetch path (atomic child-pointer exchange and parked request lists, from paratreet2'sTreeCacheCore.h, vendored here with a provenance block). The application supplies a small static Traits class that maps its node type onto the store. First client: ChaNGa's tree-node cache (N-BodyShop/changa#228), where a configure option selects this orCkCacheManager.Changes to existing code:
CkCache.hnow always compiles its request/reply counters (a few integer increments per request). Before, they were compiled only under the application macroCOSMO_STATS, which changed the class layout in the application but not inlibmoduleCkCache(the registration stubs live in the library).CmiResetMaxMemoryis skipped underCMK_RECONVERSE. Nothing else in charm uses the new class.Validation:
netlrts-darwin-arm8-smp, andmpi-linux-x86_64-smpon Purdue Anvil) and reconverse (Anvil, NCSA Delta, OLCF Frontier): ChaNGa teststep energy and restart tests pass, results identical to CkCache.--enable-smpcache=no), 2 repeats:The same commit applies cleanly to
reviewed-with-reconverse(branchtreecache-nodecache, needs a rebase onto its current tip).🤖 Generated with Claude Code