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 a bypass scheduler to improve mpi continuations #1195

Open
wants to merge 40 commits into
base: main
Choose a base branch
from

Commits on Jul 25, 2024

  1. Configuration menu
    Copy the full SHA
    1092ab3 View commit details
    Browse the repository at this point in the history
  2. Fix bug fetching non existant mpi pool

    If pika tries to use completion modes and the user did not setup a pool,
    the default pool must be returned to prevent accessing one that has not
    been created.
    biddisco committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    c617fdd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a4c4202 View commit details
    Browse the repository at this point in the history
  4. Fix mpi algorithm test

    Ensure polling is started and handle MPI errors more generically
    
    Remove return type from mpi transform
    
    Changes to mpi internals broke the RAII polling setup.
    biddisco committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    a8246e2 View commit details
    Browse the repository at this point in the history
  5. Fix inshpect violation

    biddisco committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    7f86541 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e4aecd2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fab14c9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7adc4f6 View commit details
    Browse the repository at this point in the history
  9. Fix review comments

    biddisco committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    c907efb View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    980b5b4 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    27e5ba7 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f3a3b07 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    058e27d View commit details
    Browse the repository at this point in the history
  14. Detect MPIx continuations at configure time to improve testing

    To test continuations, we need to add 16 to the numeric mpi modes
    so detecting the presence at configure time is necessary
    biddisco committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    eed85ed View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2024

  1. Configuration menu
    Copy the full SHA
    2148ea8 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2024

  1. Configuration menu
    Copy the full SHA
    a58f844 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b7b61f4 View commit details
    Browse the repository at this point in the history
  3. Disable sanitizer checks for troublesome error handler tests

    mpi transform tests using set_error are triggering stack corruption
    errors that might or might not be real, but disabling them (for now)
    will clean up the dashboard
    biddisco committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    ac45f96 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2128b42 View commit details
    Browse the repository at this point in the history
  5. Update cmake/tests/check_openmpi_continuations.cpp

    Co-authored-by: Mikael Simberg <[email protected]>
    biddisco and msimberg committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    f9b583c View commit details
    Browse the repository at this point in the history
  6. clang-format cleanup

    biddisco committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    14024b0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e8d51df View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bfc0a4e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1740ade View commit details
    Browse the repository at this point in the history
  10. Add new MPIX continuation mode that executes continuations directly

    The existing mode uses suspend/resume which can be problematic
    if threads suspend and block, but in principle we should directly
    execute continuations as function calls which this new mode does
    biddisco committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    c398315 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6941f7a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6a01cbc View commit details
    Browse the repository at this point in the history
  13. Add a new bypass scheduler to execute tasks inliine on a pika thread

    Callbacks to sender set_value/error should not be triggered directly
    on a polling thread as continuations will be called on the polling
    thread. Instead the execution should be tranferred to a pika
    thread/task.
    
    Adding a transfer adaptor costs task creation, plus enqueuing/dequeuing
    of the task, so the bypass scheduler supports inline execution, but
    with the creation of a task wrapper around the callback so that it is
    safe to suspend/resume etc and no raw scheduler/polling threads are
    running user code.
    biddisco committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    d08e547 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    9f0d830 View commit details
    Browse the repository at this point in the history
  15. Adjust transform_mpi to use bypass scheduler and fix some wrinkles

    Bypass scheduler must never be run on top of an existing pika task,
    otherwise coroutine self pointer is clobberred (thread local).
    
    Rearrange transfers in transform_mpi to better route inline
    continuations through the bypass scheduler and skip it when not needed
    biddisco committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    85cd74e View commit details
    Browse the repository at this point in the history
  16. Clean up bypass scheduler, remove debug, extraneous code

    We do not need the RAII state restorer object as our thread creation is
    always on the executing thread and certain race conditions are not valid
    
    Improve comments and remove unsupported API features
    biddisco committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    fad487d View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    548f2d5 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    2fa4aed View commit details
    Browse the repository at this point in the history
  19. Disable debug messages

    biddisco committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    53b29da View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    1cb5a17 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    5f581dc View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    cc1941d View commit details
    Browse the repository at this point in the history
  23. Fix a bad error code use

    biddisco committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    fcbf6bb View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2024

  1. Fix some bypass scheduler issues when using dla-future

    The bypass needs to be added to the cuda polling, but this termporary
    fix inserts and extra bypass before issuing mpi requests if the thread
    id is invalid.
    
    Also, if the bypass scheduler is invoked on a thread that is already a
    task, it skips task creation and becomes a simple pass through
    execution.
    biddisco committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    de64414 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7867f22 View commit details
    Browse the repository at this point in the history