PSyclone icon indicating copy to clipboard operation
PSyclone copied to clipboard

Using Symbols for VariableAccessInfo

Open hiker opened this issue 5 years ago • 3 comments

  1. The class VariableAccessInfo stores variable names as strings. Once available, they should become symbols (whose properties can be looked up using a SymbolTable).
  2. The 'array' vs 'scalar' handling (atm stored in VariablesAccessInfo) should be removed (or changed to use a symbol table).

This affects LFRic implicit variables, collected in domain/lfric/{kern_call_arg_list, kern_call_acc_arg_list, kern_stub_arglist, arg_ordering}.py - for now the scalar/array flag is not set at all (since it's not needed), but this need to be checked for correctness (though more likely as part of the symbol-table work - if the symbol table is correct, VariableAccessInfo will only look it up there, so it should all be automatically correct).

hiker avatar Jul 15 '20 00:07 hiker

I've hit this while doing #1925 for #1832. At the moment the use of dependence analysis in the loop-parallelisation transformation is protected with a try and any Internal or Key errors ignored. Sergi suggested I remove that and we use the new 'force it' option to workaround any bugs. However, removing it causes a lot of test failures, some of which boil down to the fact that GOKern._format_access returns strings which are then ending up inside ComponentIndices objects which is expecting them to be PSyIR. (The ComponentIndices constructor does not check that what it has been given is PSyIR, despite the doc string saying that is what it expects.)

arporter avatar Dec 15 '22 11:12 arporter

I've hit this while doing #1925 for #1832. At the moment the use of dependence analysis in the loop-parallelisation transformation is protected with a try and any Internal or Key errors ignored. Sergi suggested I remove that and we use the new 'force it' option to workaround any bugs. However, removing it causes a lot of test failures, some of which boil down to the fact that GOKern._format_access returns strings which are then ending up inside ComponentIndices objects which is expecting them to be PSyIR. (The ComponentIndices constructor does not check that what it has been given is PSyIR, despite the doc string saying that is what it expects.)

I just realised that this issue is handled in #2496.

hiker avatar Feb 02 '24 03:02 hiker

#2496 fixes all string usages as indices for gocean only, but there is still LFRic code the supplies e.g. '1' or ':' (strings) as indices. This is addressed as part of #2498.

hiker avatar Feb 08 '24 05:02 hiker