Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convertTypesInCompute detects the size of array in TYPE%ARRAY by acessing the array declaration with tree #27

Open
QuentinRodier opened this issue Sep 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@QuentinRodier
Copy link
Contributor

In one case, (rain_ice.f90)

!$mnh_expand_array(JRR=1:KRR)
ZRSMIN(1:KRR) = ICEDXRTMIN(1:KRR) * ZINV_TSTEP
!$mnh_end_expand_array(JRR=1:KRR)

is transformed first by mnh_expand by
DO JRR=1,KRR
ZRSMIN(JRR) = ICED%XRTMIN(JRR) * ZINV_TSTEP
END DO

then ICED%XRTMIN size is not yet accessible. Either :

  • acess the dimension of the array by reading the declaration using the tree
  • read the do-construct, access the index and guess the dimension's local array but nothing ensures that later in the routine, the data are accessed over a larger region of the array
@QuentinRodier QuentinRodier added the enhancement New feature or request label Sep 30, 2024
@QuentinRodier
Copy link
Contributor Author

Other example (without mnh_expand related) in mode_ice4_stepping :
with convertTypesInCompute within an if-then-stmt :
IF (ZA(JL, JV) < -1.E-20 .AND. PVART(JL, JV) > ICED%XRTMIN(JV)) THEN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant