Conversation
04ba253 to
3714ef8
Compare
gold2718
approved these changes
Dec 4, 2023
Collaborator
gold2718
left a comment
There was a problem hiding this comment.
One suggestion but looks okay (from a prebuild non-expert).
| errmsg = '' | ||
| errflg = 0 | ||
| ! Check size of data array | ||
| write(0,'(a,i3)') 'In blocked_data_scheme_init: checking size of data array to be', sum(data_array_sizes) |
Collaborator
There was a problem hiding this comment.
I realize this is "only" test code but I wonder if we should start using the iso_fortran_env intrinsic module for raw numbers like these. Here, that would look like:
Suggested change
| write(0,'(a,i3)') 'In blocked_data_scheme_init: checking size of data array to be', sum(data_array_sizes) | |
| use, intrinsic :: iso_fortran_env, only: error_unit | |
| write(error_unit,'(a,i3)') 'In blocked_data_scheme_init: checking size of data array to be', sum(data_array_sizes) |
Collaborator
Author
There was a problem hiding this comment.
Great suggestion, thanks! I changed it in all Fortran files in the newly added test_prebuild/test_blocked_data directory, and CI tests passed.
…only: error_unit'
dustinswales
approved these changes
Dec 5, 2023
Member
dustinswales
left a comment
There was a problem hiding this comment.
Looks good to me.
Thanks for adding this new test!
This was referenced Feb 23, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a testing framework for blocked data structures in ccpp-prebuild, and run ccpp-prebuild tests in CI
The purpose of this PR is to prepare for upcoming changes to
ccpp-prebuildto facilitate the transition tocapgen. In a nutshell, we are going to add support for chunked data arrays and the use ofhorizontal_loop_begin/horizontal_loop_endtoccpp-prebuild. With that, we can switch the UFS and other models that use blocked data structures (SCM, NEPTUNE) over to contiguous arrays that get chunked up for parallel processing using OpenMP threading.The expectation is that we'll be able to demonstrate similar or better performance and that we'll be able to remove support for blocked data structures afterwards (and in doing so won't have to add it to
capgen).This PR will be followed by a PR that adds
ccpp-prebuildcapabilities for contiguous data arrays, together with a test for the new functionality. After that, we can start working on the ufs-weather-model/SCM/NEPTUNE interface.User interface changes?: No
Fixes #500
Testing:
test removed: n/a
tests added:
ccpp-prebuildtest for blocked data structures, added allccpp-prebuildtests to CIunit tests: n/a
system tests: n/a
manual testing: Ran existing and new
ccpp-prebuildtests locally on my macOS