Skip to content

Commit

Permalink
Bug fix for initialized_set_block (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
grantfirl authored Oct 23, 2023
1 parent 3a8f278 commit 219f2e9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/mkstatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1611,6 +1611,14 @@ def write(self, metadata_request, metadata_define, arguments, debug):
if subcycle_body:
body += subcycle_body_prefix + subcycle_body + subcycle_body_suffix

#For the init stage, for the case when the suite doesn't have any schemes with init phases,
#we still need to add the host-supplied ccpp_t variable to the init group caps so that it is
#available for setting the initialized flag for the particular instance being called. Otherwise,
#the initialized_set_block for the init phase tries to reference the unavailable ccpp_t variable.
if (ccpp_stage == 'init' and not self.parents[ccpp_stage]):
ccpp_var.intent = 'in'
self.parents[ccpp_stage].update({ccpp_var.local_name:ccpp_var})

# Get list of arguments, module use statement and variable definitions for this subroutine (=stage for the group)
(self.arguments[ccpp_stage], sub_module_use, sub_var_defs) = create_arguments_module_use_var_defs(
self.parents[ccpp_stage], metadata_define, tmpvars.values())
Expand Down

0 comments on commit 219f2e9

Please sign in to comment.