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

Update develop from main 2024/12/05 #616

Merged

Conversation

climbfuji
Copy link
Collaborator

Now that we merged #615, it is time to update develop from main to pull in the few ccpp-prebuild updates that went straight into main. Must be merged as a regular merge, not as a squash merge.

… are slices of a n+1 dimensional array have wrong allocation) (NCAR#600)

## Description

1. Bug fix in `scripts/mkstatic.py`: define `dim_string_allocate` so
that temporary (group cap) variables of rank `n` that correspond to a
slice of an `n+1` dimensional array have the right dimensions in the
assignment calls and subroutine call lists. See the inline documentation
added in `mkstatic.py` around line 1476 for more information.

2. Addition of test `test_prebuild/test_unit_conv` to test for the above
and to test for the `capgen` issue reported in
NCAR#594 (Unit conversion bug
when variable is used by two different schemes with different units).
Note that `ccpp_prebuild.py` did not suffer from this bug, but I wanted
to make sure that we test for it.

3. In the development of the new test `test_unit_conv`, I discovered
that we should declare all incoming host variables in the group caps as
`target`. This is because it is tricky in prebuild to determine that a
parent variable `bar` needs to have the `target` attribute in case a
slice of it has the active attribute. This is a bit of an edge case, but
I believe this additional attribute is safe. I will run full UFS RTs
with this PR to check if the results are b4b or if the addition of
`target` causes the compiler to optimize differently.

4. Minor updates to
`test_prebuid/{test_blocked_data,test_chunked_data}`: fix wrong name of
subroutines in diagnostic error messages, set thread number and thread
counter to safe values when running over the entire domain.
Update `main` with latest commits from `develop`
Copy link
Collaborator

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One item needs updating but I'm not sure which branch should get it first.

@@ -0,0 +1,98 @@
#------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.10)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is a straightforward merge but perhaps this should be updated sometime?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly. I can go through all files after this update and bump the minimum version to what is in the top-level CMakeLists.txt.

@climbfuji
Copy link
Collaborator Author

Can we get more reviews for this PR, please? It's needed to in so that other updates can be pushed from NEPTUNE. Thanks!

# Definitions #
###############################################################################

HOST_MODEL_IDENTIFIER = "FV3"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little weird that the host model identifier is FV3 since this is a unit test that arguably has nothing to do with FV3.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, it's always been like that. Will go away when prebuild dies ....

Copy link
Collaborator

@grantfirl grantfirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. One minor comment, but since the comment refers to code already in main, there is no point in changing anything, IMO.

@climbfuji climbfuji merged commit 2133d2e into NCAR:develop Dec 9, 2024
19 checks passed
@climbfuji climbfuji deleted the feature/upd_dev_from_main_20241205 branch December 9, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants