Skip to content

Commit

Permalink
fabtests: Add progress models to SHM/EFA fabtests
Browse files Browse the repository at this point in the history
Set SHM/EFA performance fabtests to use data_progress=FI_PROGRESS_MANUAL
and control_progress=FI_PROGRESS_CONTROL_UNIFIED

Signed-off-by: Seth Zegelstein <szegel@amazon.com>
  • Loading branch information
a-szegel authored and j-xiong committed Mar 5, 2024
1 parent 9de84b7 commit cd4bff3
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 11 deletions.
4 changes: 4 additions & 0 deletions fabtests/pytest/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
from retrying import retry
import pytest


perf_progress_model_cli = "--data-progress manual --control-progress unified"
SERVER_RESTART_DELAY_MS = 10_1000
CLIENT_RETRY_INTERVAL_MS = 1_000


class SshConnectionError(Exception):

def __init__(self):
Expand Down
11 changes: 8 additions & 3 deletions fabtests/pytest/efa/test_rdm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from default.test_rdm import test_rdm, test_rdm_bw_functional
from efa.efa_common import efa_run_client_server_test
from common import perf_progress_model_cli

import pytest
import copy
Expand All @@ -9,7 +10,8 @@
[pytest.param("short", marks=pytest.mark.short),
pytest.param("standard", marks=pytest.mark.standard)])
def test_rdm_pingpong(cmdline_args, iteration_type, completion_semantic, memory_type, completion_type):
efa_run_client_server_test(cmdline_args, "fi_rdm_pingpong", iteration_type,
command = "fi_rdm_pingpong" + " " + perf_progress_model_cli
efa_run_client_server_test(cmdline_args, command, iteration_type,
completion_semantic, memory_type, "all", completion_type=completion_type)

@pytest.mark.functional
Expand All @@ -32,7 +34,8 @@ def test_rdm_pingpong_no_inject_range(cmdline_args, completion_semantic, inject_
[pytest.param("short", marks=pytest.mark.short),
pytest.param("standard", marks=pytest.mark.standard)])
def test_rdm_tagged_pingpong(cmdline_args, iteration_type, completion_semantic, memory_type, completion_type):
efa_run_client_server_test(cmdline_args, "fi_rdm_tagged_pingpong", iteration_type,
command = "fi_rdm_tagged_pingpong" + " " + perf_progress_model_cli
efa_run_client_server_test(cmdline_args, command, iteration_type,
completion_semantic, memory_type, "all", completion_type=completion_type)

@pytest.mark.functional
Expand All @@ -44,7 +47,8 @@ def test_rdm_tagged_pingpong_range(cmdline_args, completion_semantic, memory_typ
[pytest.param("short", marks=pytest.mark.short),
pytest.param("standard", marks=pytest.mark.standard)])
def test_rdm_tagged_bw(cmdline_args, iteration_type, completion_semantic, memory_type, completion_type):
efa_run_client_server_test(cmdline_args, "fi_rdm_tagged_bw", iteration_type,
command = "fi_rdm_tagged_bw" + " " + perf_progress_model_cli
efa_run_client_server_test(cmdline_args, command, iteration_type,
completion_semantic, memory_type, "all", completion_type=completion_type)

@pytest.mark.functional
Expand Down Expand Up @@ -82,6 +86,7 @@ def test_rdm_atomic(cmdline_args, iteration_type, completion_semantic, memory_ty
# the issue is tracked in: https://github.com/ofiwg/libfabric/issues/7002
# to mitigate the issue, set the maximum timeout of fi_rdm_atomic to 1800 seconds.
cmdline_args_copy = copy(cmdline_args)
command = "fi_rdm_atomic" + " " + perf_progress_model_cli
test = ClientServerTest(cmdline_args_copy, "fi_rdm_atomic", iteration_type, completion_semantic,
memory_type=memory_type, timeout=1800)
test.run()
Expand Down
5 changes: 3 additions & 2 deletions fabtests/pytest/efa/test_rma_bw.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from efa.efa_common import efa_run_client_server_test
from common import perf_progress_model_cli
import pytest
import copy

Expand All @@ -9,7 +10,7 @@
pytest.param("standard", marks=pytest.mark.standard)])
def test_rma_bw(cmdline_args, iteration_type, operation_type, completion_semantic, memory_type):
command = "fi_rma_bw -e rdm"
command = command + " -o " + operation_type
command = command + " -o " + operation_type + " " + perf_progress_model_cli
# rma_bw test with data verification takes longer to finish
timeout = max(540, cmdline_args.timeout)
efa_run_client_server_test(cmdline_args, command, iteration_type, completion_semantic, memory_type, "all", timeout=timeout)
Expand All @@ -22,7 +23,7 @@ def test_rma_bw_small_tx_rx(cmdline_args, operation_type, completion_semantic, m
cmdline_args_copy.append_environ(env_var)
# Use a window size larger than tx/rx size
command = "fi_rma_bw -e rdm -W 128"
command = command + " -o " + operation_type
command = command + " -o " + operation_type + " " + perf_progress_model_cli
# rma_bw test with data verification takes longer to finish
timeout = max(540, cmdline_args_copy.timeout)
efa_run_client_server_test(cmdline_args_copy, command, "short", completion_semantic, memory_type, "all", timeout=timeout)
Expand Down
3 changes: 2 additions & 1 deletion fabtests/pytest/efa/test_rma_pingpong.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from efa.efa_common import efa_run_client_server_test
from common import perf_progress_model_cli
import pytest


Expand All @@ -10,7 +11,7 @@ def test_rma_pingpong(cmdline_args, iteration_type, operation_type, completion_s
if memory_type != "host_to_host" and operation_type == "write":
pytest.skip("no hmem memory support for pingpong_rma write test")
command = "fi_rma_pingpong -e rdm"
command = command + " -o " + operation_type
command = command + " -o " + operation_type + " " + perf_progress_model_cli
# rma_pingpong test with data verification takes longer to finish
timeout = max(540, cmdline_args.timeout)
efa_run_client_server_test(cmdline_args, command, iteration_type, completion_semantic, memory_type, "all", timeout=timeout)
Expand Down
10 changes: 7 additions & 3 deletions fabtests/pytest/shm/test_rdm.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
import pytest
from default.test_rdm import test_rdm, \
test_rdm_bw_functional, test_rdm_atomic
from common import perf_progress_model_cli
from shm.shm_common import shm_run_client_server_test

@pytest.mark.parametrize("iteration_type",
[pytest.param("short", marks=pytest.mark.short),
pytest.param("standard", marks=pytest.mark.standard)])
def test_rdm_pingpong(cmdline_args, iteration_type, completion_semantic, memory_type, completion_type):
shm_run_client_server_test(cmdline_args, "fi_rdm_pingpong", iteration_type,
command = "fi_rdm_pingpong" + " " + perf_progress_model_cli
shm_run_client_server_test(cmdline_args, command, iteration_type,
completion_semantic, memory_type, completion_type=completion_type)


@pytest.mark.parametrize("iteration_type",
[pytest.param("short", marks=pytest.mark.short),
pytest.param("standard", marks=pytest.mark.standard)])
def test_rdm_tagged_pingpong(cmdline_args, iteration_type, completion_semantic, memory_type, completion_type):
shm_run_client_server_test(cmdline_args, "fi_rdm_tagged_pingpong", iteration_type,
command = "fi_rdm_tagged_pingpong" + " " + perf_progress_model_cli
shm_run_client_server_test(cmdline_args, command, iteration_type,
completion_semantic, memory_type, completion_type=completion_type)


@pytest.mark.parametrize("iteration_type",
[pytest.param("short", marks=pytest.mark.short),
pytest.param("standard", marks=pytest.mark.standard)])
def test_rdm_tagged_bw(cmdline_args, iteration_type, completion_semantic, memory_type, completion_type):
shm_run_client_server_test(cmdline_args, "fi_rdm_tagged_bw", iteration_type,
command = "fi_rdm_tagged_bw" + " " + perf_progress_model_cli
shm_run_client_server_test(cmdline_args, command, iteration_type,
completion_semantic, memory_type, completion_type=completion_type)

@pytest.mark.functional
Expand Down
3 changes: 2 additions & 1 deletion fabtests/pytest/shm/test_rma_bw.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
from shm.shm_common import shm_run_client_server_test
from common import perf_progress_model_cli


@pytest.mark.parametrize("operation_type", ["read", "writedata", "write"])
Expand All @@ -8,7 +9,7 @@
pytest.param("standard", marks=pytest.mark.standard)])
def test_rma_bw(cmdline_args, iteration_type, operation_type, completion_semantic, memory_type):
command = "fi_rma_bw -e rdm"
command = command + " -o " + operation_type
command = command + " -o " + operation_type + " " + perf_progress_model_cli
# rma_bw test with data verification takes longer to finish
timeout = max(540, cmdline_args.timeout)
shm_run_client_server_test(cmdline_args, command, iteration_type, completion_semantic, memory_type, "all", timeout=timeout)
Expand Down
3 changes: 2 additions & 1 deletion fabtests/pytest/shm/test_rma_pingpong.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
from shm.shm_common import shm_run_client_server_test
from common import perf_progress_model_cli


@pytest.mark.parametrize("operation_type", ["writedata", "write"])
Expand All @@ -10,7 +11,7 @@ def test_rma_pingpong(cmdline_args, iteration_type, operation_type, completion_s
if memory_type != "host_to_host" and operation_type == "write":
pytest.skip("no hmem memory support for pingpong_rma write test")
command = "fi_rma_pingpong -e rdm"
command = command + " -o " + operation_type
command = command + " -o " + operation_type + " " + perf_progress_model_cli
# rma_pingpong test with data verification takes longer to finish
timeout = max(540, cmdline_args.timeout)
shm_run_client_server_test(cmdline_args, command, iteration_type, completion_semantic, memory_type, "all", timeout=timeout)
Expand Down

0 comments on commit cd4bff3

Please sign in to comment.