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

fabtests/rdm_atomic, ubertest: move atomic verification to common code and use in functional test #10155

Merged
merged 12 commits into from
Oct 15, 2024

Commits on Oct 14, 2024

  1. windows/osd.h: fix and refactor logical operations on complex numbers

    Fix incorrect atomic LOR on complex numbers. The values were incorrectly
    getting ANDed together instead of ORed. This went unnoticed because the
    code was very difficult to read. This also refactors the logical checks
    with a helper function to make it more readible and less prone to errors.
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    a57ffc1 View commit details
    Browse the repository at this point in the history
  2. fabtests/common: move ubertest atomic validation code to common

    This allows fabtests to make use of atomic validation code
    
    There were many Windows atomics bugs, inconsistencies, and missing
    definitions. This patch also cleans up the entire ofi_atomic.c
    implementation for unix and windows
    
    The following changes are included:
    - Separate fill and check based on real or complex types as setting
      and reading complexes on windows is not allowed (not native datatype, abstracted).
      Complex versions use eq and set functions specific for complexes defined in osd.h
    - Remove duplicated ofi_complex definitions in ofi_atomic (already in osd.h file)
    - Add general check_atomic and fill_atomic calls and use them in ubertest
    - Add EXPAND ( x ) x define to work nicely with windows VA_ARGS handling
    - Fix inconsistency with ofi_complex_type/or naming ('complex' always should come first)
    - Fix inconsistency with op names "equ" and "mul" -> "eq" and "prod"
    - Add missing lxor complex op definitions on Windows
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    e78fb3a View commit details
    Browse the repository at this point in the history
  3. fabtests/common: add hmem support to common atomic validation

    To properly validate atomic data, we need host bounce buffers for the
    result and compare buffers in addition to the regular bounce buffer for
    the tx/rx bufs.
    This adds two extra bufs allocated only for atomic purposes and adds hmem
    support to the common atomic validation path.
    It also renames the alloc/free_tx_buf calls to generic alloc/free_host_bufs
    which allocates all three buffers at once.
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    6b1c3ac View commit details
    Browse the repository at this point in the history
  4. fabtests/common: fix atomic buffer

    ft_post_atomic posted "buf" which is the base address for the entire
    send and recv buffer allocation. The first half of the allocation is the
    receive buffer and the second half is the send buffer. Posting just "buf"
    meant it was sending the receive buffer.
    This changes it to send the tx buf and do an atomic on the rx buf which allows
    us to properly do atomic validation
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    e2bbf3b View commit details
    Browse the repository at this point in the history
  5. fabtests/common: change sync message to be 0 bytes instead of 1 byte

    This allows us to post the rx buf without corrupting memory in case its needed
    for validation
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    5a0f865 View commit details
    Browse the repository at this point in the history
  6. fabtests/hmem: change ZE memset to use uint8

    Match the behavior of memset() where the value passed in
    is an int, but it is interpreted as a char.
    While ZE can technically handle this scenario, others may not
    so we need to standardize across ifaces
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    9a1eaed View commit details
    Browse the repository at this point in the history
  7. functional/rdm_atomic: add data validation

    Add data validation to the atomic test by using the newly added atomic fill and check
    support imported from ubertest. This code uses a macro that switches on datatype for
    filling and checking the buffer contents.
    
    The atomic validation path requires an extra buffer to copy the contents of the original
    atomic buffer in order to recreate the atomic function locally and check the buffer against
    the simulated atomic operation.
    
    This patch also refactors the entire test to remove the extremely confusing macros used
    for the base/fetch/compare operations. The macros made the code extremely difficult to
    read and debug and also made it difficult to add data validation. Separating it into
    three explicit functions is about the same amount of code and significantly more readable
    
    Synchronization messages are added in the validation case to ensure the atomic operation
    completed on both sides before validation occurs. This requires the addition of the
    FI_ORDER_SAW and FI_ORDER_SAR message ordering to ensure that we get the completion for
    the send/recv sync after the atomic message is processed
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    1bad335 View commit details
    Browse the repository at this point in the history
  8. fabtests/runfabtests.sh: add rdm_atomic validation tests

    Run fi_rdm_atomic with data validation in standard and short test suites
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    2e47ddd View commit details
    Browse the repository at this point in the history
  9. fabtests/runfabtests.cmd: add atomic tests to windows testing

    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    9aec0fc View commit details
    Browse the repository at this point in the history
  10. prov/psm3: disable complex comparison combinations

    Comparison of complex numbers is undefined and not a valid
    combination of atomic ops. Disable in psm3
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    50aa464 View commit details
    Browse the repository at this point in the history
  11. prov/psm3: check atomic op error code

    Report atomic op errors back to the application.
    Some datatype/op combinations were falsely being reported
    to the application but failing when the atomic was being
    performed. These failures were silently treated as successful
    because the errors were not passed back. Check the error code
    to catch future issues
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    330fece View commit details
    Browse the repository at this point in the history
  12. prov/psm3: fix logical atomic function calls

    psm3 advertises support for logical ops (lor, land, lxor)
    with all datatypes but the functions are only defined for
    integer types. When the atomic op is called with a non-integer
    type, it drops down to the default case and returns an error
    (FI_ENOTSUPP)
    
    Signed-off-by: Alexia Ingerson <[email protected]>
    aingerson committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    09a6a50 View commit details
    Browse the repository at this point in the history