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

Add/improve errors for .localAccess() calls to non-local elements #25754

Merged
merged 20 commits into from
Sep 10, 2024

Commits on Aug 14, 2024

  1. Add .localAccess() errors for remote single-locale arrays

    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    22618dd View commit details
    Browse the repository at this point in the history
  2. Refactor to support better errors for block-distributed arrays as well

    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    4128a23 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2024

  1. Change localCheck to a param to avoid module init circularities

    I considered doing this in the original draft since the value is
    always known and the different callsites need different things,
    but shied away from it worrying about code size increases.
    However, I'm getting problems with module initialization orders
    for tests like:
    
    arrays/ferguson/array-initialization-patterns/array-init-replicated.chpl
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    f55e69d View commit details
    Browse the repository at this point in the history
  2. Extend locality checks to handle arrays with multiple blocks per locale

    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    b71e027 View commit details
    Browse the repository at this point in the history
  3. Skip new tests for a single locale; they're designed for multiple

    (not to say they wouldn't be interesting to test on a single as well
    to make sure there's no error, but getting the .good files right
    doesn't seem worth the effort given that they'll vary from case to
    case.
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    ef3e202 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. Merge branch 'main' of https://github.com/chapel-lang/chapel into loc…

    …alaccess-error-improvements
    bradcray committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    1175602 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. Fix localSubdomains() calls for main distributions in the face of dup…

    … locales
    
    It seems these have never worked, and that the tests written to see
    whether they did were getting away with things?
    
    Also, add a test showing why my implementation so far is insufficient
    to make locality checks for Stencils work.
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    34a636e View commit details
    Browse the repository at this point in the history
  2. Rework local access checks to permit a new optional interface for Ste…

    …ncilDist
    
    This adds a new iterator similar to localSubdomains() yet which
    returns all stored local indices, whether part of the locale's
    subdomain or not, to permit fluff to be considered "in bounds" for
    local accesses.
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    adabcef View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2024

  1. Merge branch 'main' of https://github.com/chapel-lang/chapel into loc…

    …alaccess-error-improvements
    bradcray committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    802c72a View commit details
    Browse the repository at this point in the history
  2. Update a sensitive-to-uid changes .bad entries

    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    9a30dd7 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Remove trailing spaces

    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    12f63a0 View commit details
    Browse the repository at this point in the history
  2. Clean up skipifs and generalize for --no-local testing

    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    5df5a4a View commit details
    Browse the repository at this point in the history
  3. Update test to work for comm=none as well; add more working + error c…

    …ases
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    266fb3f View commit details
    Browse the repository at this point in the history
  4. Clean up localAccess indexing expressions for 1D and nD arrays

    Also, add new test of multidim localAccess bounds violation to lock that
    case in.
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    435c1bf View commit details
    Browse the repository at this point in the history
  5. Clean up / simplify code and diff

    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    f7270bd View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. Act on part of Engin's feedback

    The main piece of feedback I'm acting on here is to update the comment
    in StencilDom.doiLocalStoredSubdomains(), which had fallen out of date
    when I removed the 'locale' argument to the iterator in a
    late-breaking commit.  Here, I've updated it to note that the current
    call should be communication-free since we are always answering the
    question for 'here'.  I've also updated the stencil localAccess.chpl
    test to wrap the localAccess calls in a `local` block to lock in that
    no communication is required to implement the calls.
    
    Then I took that same principle to the localAccess-block*.chpl tests
    to lock in that the block localAccess calls do not require
    communication.
    
    Note that I used an unusual formatting scheme here because I didn't
    want to have to update the line numbers of the error messages... :(
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    f76bf02 View commit details
    Browse the repository at this point in the history
  2. Add illegal local access back in to capture error

    Engin pointed out, rightly, that in updating these tests to make the
    localaccess calls legal, I aso pointed out that we had a pre-existing
    bug specific to the case of oversubsctibed locales that we didn't have
    any tests catching.  So here, I've added the illegal accesses back at
    the end of the test to lock in the remote accesses.
    
    The reason that these cases are different is that our dsiLocalAccess()
    calls on Block and Cyclic use different (arguably incorrect) logic
    when used in an oversubscribed manner.
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    24b927e View commit details
    Browse the repository at this point in the history
  3. Update stencil oversubscription test for multiple locales

    While reviewing the block and cyclic versions of this test, it wasn't
    clear to me why this stencil version of the test didn't require changes
    when the others did.  It turns out that the answer is that it wasn't
    ever enabled for multi-locale runs...  Fixing that here, and updating
    it similar to the block and stencil versions.
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    629421f View commit details
    Browse the repository at this point in the history
  4. Add --checks flags to localAccess error test cases

    This adds a --checks flag to all these tests I've been working on for
    localAccess() errors to ensure that they don't fail in --fast testing.
    This may be the first time in years I've thought of this before having
    the nightly tests point out my mistake (?).
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    05ec799 View commit details
    Browse the repository at this point in the history
  5. With new error-generating localAccess cases added, specialize .goods …

    …for comm=none
    
    ---
    Signed-off-by: Brad Chamberlain <[email protected]>
    bradcray committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    2f9db17 View commit details
    Browse the repository at this point in the history