-
Notifications
You must be signed in to change notification settings - Fork 55
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
Enable Subfield Slices Spanning a Range of indices (Issue #1312) #2785
Conversation
Converting from draft to full PR after adding tests for Note: the ekat branch for the PR is over on my fork, since I don't yet have push access to |
Status Flag 'Pull Request AutoTester' - GitHub reports Mergeable status = False |
Thanks. Quick question: For future reference, how hard would it be to generalize this to take noncontiguous slices? Say by passing a sorted/unsorted map/list? @AaronDonahue there's a PR in EKAT upstream, but probably a clean EKAT submodule update is in order? E3SM-Project/EKAT#333 |
@AaronDonahue @mahf708 And, @mahf708, in response to your question, I've given it a little thought, and I don't think it'd be an enormous undertaking, but I do think it would require a new approach. The reason being that, as far as I know, kokkos allows slicing only with scalars, It also occurred to me that it could be nice to be able to slice multiple dimensions at once, but I'm not sure whether there's a ready use case and also whether that might be approaching too much complexity |
c3a3ed2
to
16d63ec
Compare
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Using Repos:
Pull Request Author: mjs271 |
Thanks @mjs271!
Yep, that's what I was thinking too. We can circle back to it later when there's more of a need along with multi-dim slicing 😸 |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED Note: Testing will normally be attempted again in approx. 2 Hrs. If a change to the PR source branch occurs, the testing will be attempted again on next available autotester run. Pull Request Auto Testing has FAILED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
SCREAM_PullRequest_Autotester_Mappy # 5173 FAILED (click to see last 100 lines of console output)
SCREAM_PullRequest_Autotester_Weaver # 5521 PASSED (click to see last 100 lines of console output)
|
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Using Repos:
Pull Request Author: mjs271 |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED Note: Testing will normally be attempted again in approx. 2 Hrs. If a change to the PR source branch occurs, the testing will be attempted again on next available autotester run. Pull Request Auto Testing has FAILED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
SCREAM_PullRequest_Autotester_Mappy # 5179 FAILED (click to see last 100 lines of console output)
SCREAM_PullRequest_Autotester_Weaver # 5523 PASSED (click to see last 100 lines of console output)
|
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Using Repos:
Pull Request Author: mjs271 |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED Note: Testing will normally be attempted again in approx. 2 Hrs. If a change to the PR source branch occurs, the testing will be attempted again on next available autotester run. Pull Request Auto Testing has FAILED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
SCREAM_PullRequest_Autotester_Mappy # 5182 FAILED (click to see last 100 lines of console output)
SCREAM_PullRequest_Autotester_Weaver # 5526 PASSED (click to see last 100 lines of console output)
|
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Using Repos:
Pull Request Author: mjs271 |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED Note: Testing will normally be attempted again in approx. 2 Hrs. If a change to the PR source branch occurs, the testing will be attempted again on next available autotester run. Pull Request Auto Testing has FAILED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
SCREAM_PullRequest_Autotester_Mappy # 5186 FAILED (click to see last 100 lines of console output)
SCREAM_PullRequest_Autotester_Weaver # 5530 PASSED (click to see last 100 lines of console output)
|
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Using Repos:
Pull Request Author: mjs271 |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED Note: Testing will normally be attempted again in approx. 2 Hrs. If a change to the PR source branch occurs, the testing will be attempted again on next available autotester run. Pull Request Auto Testing has FAILED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
SCREAM_PullRequest_Autotester_Mappy # 5190 FAILED (click to see last 100 lines of console output)
SCREAM_PullRequest_Autotester_Weaver # 5534 FAILED (click to see last 100 lines of console output)
|
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Using Repos:
Pull Request Author: mjs271 |
Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
All Jobs Finished; status = PASSED, target_sha=d0adfce2ba20d75dc008be3510b28275b5c0f0bd, However Inspection must be performed before merge can occur... |
3 similar comments
All Jobs Finished; status = PASSED, target_sha=d0adfce2ba20d75dc008be3510b28275b5c0f0bd, However Inspection must be performed before merge can occur... |
All Jobs Finished; status = PASSED, target_sha=d0adfce2ba20d75dc008be3510b28275b5c0f0bd, However Inspection must be performed before merge can occur... |
All Jobs Finished; status = PASSED, target_sha=d0adfce2ba20d75dc008be3510b28275b5c0f0bd, However Inspection must be performed before merge can occur... |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Using Repos:
Pull Request Author: mjs271 |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
|
All Jobs Finished; status = PASSED, target_sha=9f8ce1fa49acc5793cdee7c3c5fae94e979025e8, However Inspection must be performed before merge can occur... |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Using Repos:
Pull Request Author: mjs271 |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
|
All Jobs Finished; status = PASSED, target_sha=b80e1bdc3f2e4e66d2f8c2a2f97a395cb34c8fd6, However Inspection must be performed before merge can occur... |
1 similar comment
All Jobs Finished; status = PASSED, target_sha=b80e1bdc3f2e4e66d2f8c2a2f97a395cb34c8fd6, However Inspection must be performed before merge can occur... |
Status Flag 'Pull Request AutoTester' - User Requested Retest - Label AT: RETEST will be reset after testing. |
2 similar comments
Status Flag 'Pull Request AutoTester' - User Requested Retest - Label AT: RETEST will be reset after testing. |
Status Flag 'Pull Request AutoTester' - User Requested Retest - Label AT: RETEST will be reset after testing. |
Status Flag 'Pull Request AutoTester' - User Requested Retest - Label AT: RETEST will be reset after testing. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
Using Repos:
Pull Request Author: mjs271 |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED Note: Testing will normally be attempted again in approx. 2 Hrs. If a change to the PR source branch occurs, the testing will be attempted again on next available autotester run. Pull Request Auto Testing has FAILED (click to expand)Build InformationTest Name: SCREAM_PullRequest_Autotester_Mappy
Jenkins Parameters
Build InformationTest Name: SCREAM_PullRequest_Autotester_Weaver
Jenkins Parameters
SCREAM_PullRequest_Autotester_Mappy # 5520 FAILED (click to see last 100 lines of console output)
SCREAM_PullRequest_Autotester_Weaver # 5791 PASSED (click to see last 100 lines of console output)
|
NL fails are due to the upstream merge (we have to bless). Merging. |
This PR adds functionality that allows a user to create a "multi-slice" subfield and gain access to the underlying view. That is, a multi-slice subfield is in contrast to the previous capability that sliced a single entry of a chosen dimension--e.g.,
view(:, 7, :)
to use notation common to fortran/matlab, and expands this capability to allow for slicing a chosen dimension across a range of values--e.g.,view(:, 2:7, :)
.Summary of changes and capabilities:
Field::subfield()
that takes the extra argument(s)index_beg, index_end
to indicate the bounds of the slicing range.Field::get_multi_sliced_view()
that provides the view underlying the subfield as a multi-dimensional view with the same number of dimensions as the parent's associated view (as opposed to a single-sliced view that is (N - 1)-dimensional.LayoutStride
view, rather thanLayoutRight
.I do need to add a few more tests and will push those changes soon, but I wanted to get this out there as a draft. Any feedback about my approach would be much-appreciated, since this is my first time doing a deep-dive into this code.
Closes #1312