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

Support decompositions with extra outermost dimensions #113

Merged
merged 2 commits into from
Aug 1, 2018

Conversation

dqwu
Copy link
Contributor

@dqwu dqwu commented Jun 19, 2018

In PIO1, a decomposition can have extra outermost dimensions
with their lengths all set to 1. For example, we can define a
3D decomposition of [1 x 10 x 20] to read/write a 2D variable
of [10 x 20], or a 3D record variable of [time x 10 x 20].

This feature is not supported by PIO2 so far. PIO2 might get
mismatched start/count values from the decomposition, and
access an array out of its bounds.

New Fortran unit tests are added for this enhancement, and
PIO2 code is updated to get correct start/count values from
the decomposition.

This feature branch has been extensively tested. All PIO2 unit
tests, e3sm_developer tests and cime_developer tests passed.
A High-resolution F case run on Cori also passed.

Fixes #106

@dqwu dqwu requested a review from jayeshkrishna June 19, 2018 17:49
@dqwu dqwu force-pushed the dqwu/decomp_extra_dims branch 2 times, most recently from e87f5da to ec8cd6d Compare July 20, 2018 18:58
In PIO1, a decomposition can have extra outermost dimensions
with their lengths all set to 1. For example, we can define a
3D decomposition of [1 x 10 x 20] to read/write a 2D variable
of [10 x 20], or a 3D record variable of [time x 10 x 20].

We need to test non-record variable, record variable (uses
unlimited time dimension) and quasi-record variable (uses
limited time dimension) for extra dimensions.

For these tests to pass, existing PIO2 code needs to be updated
to get matched start/count values from the decomposition.
@dqwu dqwu force-pushed the dqwu/decomp_extra_dims branch from ec8cd6d to 87b447d Compare July 22, 2018 20:18
Update existing PIO2 code to get matched start/count values from
a decomposition that might have extra dimensions.

For start/count arrays, correct some for loops on the condition
part according to their lengths.

Strictly speaking, record variables are ones that use unlimited
time dimension (rec_var flag is set). However, some E3SM tests
do handle "quasi-record" variables (use limited time dimension,
thus rec_var flag is NOT set).

If a variable has more than one dimension and its record number
has been set, we assume that it is either a record variable or
a "quasi-record" one (handled similarly).
@dqwu dqwu force-pushed the dqwu/decomp_extra_dims branch from 87b447d to d0163d2 Compare July 22, 2018 21:05
Copy link
Contributor

@jayeshkrishna jayeshkrishna left a comment

Choose a reason for hiding this comment

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

Looks good to me

@jayeshkrishna jayeshkrishna assigned dqwu and unassigned jayeshkrishna Jul 30, 2018
@dqwu dqwu merged commit 7549327 into master Aug 1, 2018
@dqwu dqwu deleted the dqwu/decomp_extra_dims branch August 1, 2018 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants