Skip to content

Part of #2384: Checkpoint numeric arrays; improved framework - #4644

Merged
ajpotts merged 1 commit into
Bears-R-Us:masterfrom
vasslitvinov:tidy-reg-framework
Jun 24, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:masterfrom
vasslitvinov:tidy-reg-framework

Conversation

@vasslitvinov

Copy link
Copy Markdown
Contributor

Add the ability for checkpointing to save and load 1-d arrays of any integer or real or bool types specified in registration-config.json.

Implementation-wise, set up a framework for checkpointing of any subclasses of AbstractSymEntry, by using dynamic dispatch and starting the entry metadata file with a line that is consistent across all entry kinds.

Furthermore, set up a framework in the server code that allows param for-loops over all param dimensions and all element types specified in "parameter_classes"["array"] in registration-config.json.

In more implementation detail, the list of "parameter_classes"["array"]["nd"] is now available through arrayDimensionsTy; "parameter_classes"["array"]["dtype"] through arrayElementsTy. These are generated into src/registry/Commands.chpl by src/registry/register_commands.py, which handles @arkouda.instantiateAndRegister and similar attributes. Their use is exemplified by the implementations of arrayDimIsSupported(), arrayElmTypeIsSupported() or loadSymEntry().

This framework will be leveraged to implement checkpointing of the remaining types of SymTab entries. The type-tuple-based approach is a workaround for Chapel's lack of iterators that yield param or type.

Other implementation changes:

Restricted addEntry() to handle only those types that are requested in registration-config.json. This reduces the amount of generated code because the compiler no longer needs to instantiate SymEntry for some of the unintended types, such as [u]int16 and 32.

Extended SymTab.insert() to set the new entry's name, which would otherwise be left empty.

Replaced uses of MaxArrayDims with arrayDimIsSupported(), except for one in getConfig().

Moved getRegistrationConfig() from register_commands.py to MsgProcessing.chpl for easier maintenance, and simplified it.

@ajpotts ajpotts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@ShreyasKhandekar
ShreyasKhandekar self-requested a review June 23, 2025 18:43
Comment thread src/MultiTypeSymbolTable.chpl Resolved
@ajpotts
ajpotts enabled auto-merge June 24, 2025 17:40
auto-merge was automatically disabled June 24, 2025 18:29

Head branch was pushed to by a user without write access

@ajpotts
ajpotts enabled auto-merge June 24, 2025 19:56
@ajpotts
ajpotts added this pull request to the merge queue Jun 24, 2025
Merged via the queue into Bears-R-Us:master with commit 17e523f Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants