Skip to content

Commit

Permalink
fabtests/pytest: use different message sizes for rma pingpong
Browse files Browse the repository at this point in the history
Signed-off-by: Jessie Yang <[email protected]>
  • Loading branch information
jiaxiyan committed Jun 6, 2024
1 parent 166c2b6 commit fa91dd3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
15 changes: 11 additions & 4 deletions fabtests/pytest/efa/test_rma_pingpong.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
import pytest


@pytest.fixture(params=["r:4048,4,4148",
"r:8000,4,9000",
"r:17000,4,18000"])
def rma_pingpong_message_size(request):
return request.param


@pytest.mark.parametrize("operation_type", ["writedata", "write"])
@pytest.mark.parametrize("iteration_type",
[pytest.param("short", marks=pytest.mark.short),
Expand All @@ -19,23 +26,23 @@ def test_rma_pingpong(cmdline_args, iteration_type, operation_type, completion_s

@pytest.mark.functional
@pytest.mark.parametrize("operation_type", ["writedata", "write"])
def test_rma_pingpong_range(cmdline_args, operation_type, completion_semantic, message_size, memory_type):
def test_rma_pingpong_range(cmdline_args, operation_type, completion_semantic, rma_pingpong_message_size, memory_type):
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
# rma_pingpong test with data verification takes longer to finish
timeout = max(540, cmdline_args.timeout)
efa_run_client_server_test(cmdline_args, command, "short", completion_semantic, memory_type, message_size, timeout=timeout)
efa_run_client_server_test(cmdline_args, command, "short", completion_semantic, memory_type, rma_pingpong_message_size, timeout=timeout)


@pytest.mark.functional
@pytest.mark.parametrize("operation_type", ["writedata", "write"])
def test_rma_pingpong_range_no_inject(cmdline_args, operation_type, completion_semantic, inject_message_size, memory_type):
def test_rma_pingpong_range_no_inject(cmdline_args, operation_type, completion_semantic, rma_pingpong_message_size, memory_type):
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 -j 0"
command = command + " -o " + operation_type
# rma_pingpong test with data verification takes longer to finish
timeout = max(540, cmdline_args.timeout)
efa_run_client_server_test(cmdline_args, command, "short", completion_semantic, "host_to_host", inject_message_size, timeout=timeout)
efa_run_client_server_test(cmdline_args, command, "short", completion_semantic, "host_to_host", rma_pingpong_message_size, timeout=timeout)
11 changes: 9 additions & 2 deletions fabtests/pytest/shm/test_rma_pingpong.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
from common import perf_progress_model_cli


@pytest.fixture(params=["r:4048,4,4148",
"r:8000,4,9000",
"r:17000,4,18000"])
def rma_pingpong_message_size(request):
return request.param


@pytest.mark.parametrize("operation_type", ["writedata", "write"])
@pytest.mark.parametrize("iteration_type",
[pytest.param("short", marks=pytest.mark.short),
Expand All @@ -18,11 +25,11 @@ def test_rma_pingpong(cmdline_args, iteration_type, operation_type, completion_s

@pytest.mark.functional
@pytest.mark.parametrize("operation_type", ["writedata", "write"])
def test_rma_pingpong_range(cmdline_args, operation_type, completion_semantic, message_size, memory_type):
def test_rma_pingpong_range(cmdline_args, operation_type, completion_semantic, rma_pingpong_message_size, memory_type):
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
# rma_pingpong test with data verification takes longer to finish
timeout = max(540, cmdline_args.timeout)
shm_run_client_server_test(cmdline_args, command, "short", completion_semantic, memory_type, message_size, timeout=timeout)
shm_run_client_server_test(cmdline_args, command, "short", completion_semantic, memory_type, rma_pingpong_message_size, timeout=timeout)

0 comments on commit fa91dd3

Please sign in to comment.