ccpp-framework icon indicating copy to clipboard operation
ccpp-framework copied to clipboard

Add "number of instances" dimension to module-level variables to support multi-instance usage

Open peverwhee opened this issue 1 year ago • 1 comments

Description

In order to enable multiple instances, we'll need a new dimension on all module-level (host caps and suite caps) variables. This includes: _dynamic_constituents (host cap), _constituents_obj? (host cap)

Solution

Add/update the following:

  • New ccpp variables (standard names not set in stone): "number_of_ccpp_instances" (integer) and "ccpp_instance" (integer, index)
  • Add an extra dimension to module variable declarations
  • Update allocate statements (in the init phase) to allocate the new dimension to the # of instances

User Interface Changes

Optional - host can now supply instance number to the cap routines (if not supplied, defaults to 1)

peverwhee avatar Apr 29 '24 18:04 peverwhee

Note, there was some discussion of this in the PR to prebuild a while ago. See the comment about the proposed capgen implementation for a suggestion about CCPP standard names that could be used for this method.

gold2718 avatar Apr 29 '24 19:04 gold2718