You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LFRicIssue relates to the LFRic domainNG-ARCHIssues relevant to the GPU parallelisation of LFRic and other models expected to be used in NG-ARCHPSyData
While #2706 adds support for derived type, this actually only works if components of a derived types are used, e.g.:
DO j = tdims % j_start, tdims % j_end
This would add tdims%jstart and j_end to the kernel-data-file as expected. But if a whole derived type is passed on as an argument, the extraction/driver creation fails. Example:
TYPE(array_dims), SAVE :: tdims
...
CALL pc2_checks(...tdims % i_len, tdims % j_len, tdims % k_end, ...) ! This works
CALL wtrac_pc2_phase_chg(tdims, q, qcl, 'pc2_initiate', wtrac = wtrac) ! Doesn't work
In this case the driver creation fails because tdims has no intrinsic type. (which happens when the driver tries to create the corresponding _post variable)
As far as I can see, the only option here is to add code that can write the all individual components of a derived type, and make sure that the two different usages (tdims%i_len and tdims) are stored only once for the same object.
Suggested approach:
If a structure type is detected in the access analysis, replace it with access to each individual element (recursively in case of nested derived types)
Not sure if this should become an option of the variable access collection, or a post-processing step
Update the driver extraction (if still required) to read the individual components
Verify the extraction. At this stage, I would expect the extraction to fail to compile (since there won't be a generic interface that can write the derived type
The text was updated successfully, but these errors were encountered:
hiker
added
LFRic
Issue relates to the LFRic domain
PSyData
NG-ARCH
Issues relevant to the GPU parallelisation of LFRic and other models expected to be used in NG-ARCH
labels
Dec 19, 2024
LFRicIssue relates to the LFRic domainNG-ARCHIssues relevant to the GPU parallelisation of LFRic and other models expected to be used in NG-ARCHPSyData
While #2706 adds support for derived type, this actually only works if components of a derived types are used, e.g.:
This would add
tdims%jstart
andj_end
to the kernel-data-file as expected. But if a whole derived type is passed on as an argument, the extraction/driver creation fails. Example:In this case the driver creation fails because
tdims
has no intrinsic type. (which happens when the driver tries to create the corresponding_post
variable)As far as I can see, the only option here is to add code that can write the all individual components of a derived type, and make sure that the two different usages (
tdims%i_len
andtdims
) are stored only once for the same object.Suggested approach:
The text was updated successfully, but these errors were encountered: