Skip to content

Commit

Permalink
fabtests/multinode: update arguments
Browse files Browse the repository at this point in the history
Update arguments to avoid conflicts with other tests.

Signed-off-by: Alex McKinley <[email protected]>
  • Loading branch information
alex-mckinley committed May 30, 2024
1 parent 3967943 commit 7ae2c59
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 21 deletions.
37 changes: 33 additions & 4 deletions fabtests/multinode/src/harness.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,17 +321,20 @@ int main(int argc, char **argv)
if (!hints)
return EXIT_FAILURE;

while ((c = getopt(argc, argv, "n:C:z:Th" CS_OPTS INFO_OPTS)) != -1) {
while ((c = getopt(argc, argv, "n:x:z:Ths:I:" INFO_OPTS)) != -1) {
switch (c) {
default:
ft_parse_addr_opts(c, optarg, &opts);
ft_parseinfo(c, optarg, hints, &opts);
ft_parsecsopts(c, optarg, &opts);
break;
case 'I':
opts.options |= FT_OPT_ITER;
opts.iterations = atoi(optarg);
break;
case 'n':
pm_job.num_ranks = atoi(optarg);
break;
case 'C':
case 'x':
pm_job.transfer_method = parse_caps(optarg);
break;
case 'T':
Expand All @@ -342,7 +345,33 @@ int main(int argc, char **argv)
break;
case '?':
case 'h':
ft_usage(argv[0], "A simple multinode test");
fprintf(stderr, "Usage:\n");
fprintf(stderr, " fi_multinode -s SERVER_NAME "
"-n NUM_RANKS [OPTIONS]\n\n");
fprintf(stderr, " repeat command for each client\n");
fprintf(stderr, " reccomend using "
"fabtests/scripts/runmultinode.sh\n\n");

fprintf(stderr, "fi_multinode specific options: \n\n");
FT_PRINT_OPTS_USAGE("-n <num_ranks>", "Number of ranks"
" to expect");
FT_PRINT_OPTS_USAGE("-x <xfer_mode>", "msg or rma "
"message mode");
FT_PRINT_OPTS_USAGE("-I <iters>", "number of iterations");
FT_PRINT_OPTS_USAGE("-T", "pass to enable performance "
"timing mode");
FT_PRINT_OPTS_USAGE("-z <pattern>", "full_mesh, ring, "
"gather, or broadcast pattern. "
"Default: All\n");

fprintf(stderr, "General Fabtests options: \n\n");
FT_PRINT_OPTS_USAGE("-f <fabric>", "fabric name");
FT_PRINT_OPTS_USAGE("-d <domain>", "domain name");
FT_PRINT_OPTS_USAGE("-p <provider>",
"specific provider name eg sockets, verbs");
ft_addr_usage();
ft_hmem_usage();

return EXIT_FAILURE;
}
}
Expand Down
6 changes: 3 additions & 3 deletions fabtests/pytest/default/test_multinode.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@


@pytest.mark.multinode
@pytest.mark.parametrize("C", ["msg", "rma"])
def test_multinode(cmdline_args, C):
@pytest.mark.parametrize("x", ["msg", "rma"])
def test_multinode(cmdline_args, x):

numproc = 3
client_hostname_list = [cmdline_args.client_id, ] * (numproc - 1)
client_base_command = "fi_multinode -C " + C + f" -n {numproc}"
client_base_command = "fi_multinode -x " + x + f" -n {numproc}"
server_base_command = client_base_command
test = MultinodeTest(cmdline_args, server_base_command, client_base_command,
client_hostname_list, run_client_asynchronously=True)
Expand Down
4 changes: 2 additions & 2 deletions fabtests/scripts/runfabtests.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ set standard_tests=^
"rdm_tagged_bw -v -U"

set multinode_tests=^
"multinode -C msg"^
"multinode -C rma"
"multinode -x msg"^
"multinode -x rma"


goto :global_main
Expand Down
4 changes: 2 additions & 2 deletions fabtests/scripts/runfabtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ complex_tests=(
)

multinode_tests=(
"fi_multinode -C msg"
"fi_multinode -C rma"
"fi_multinode -x msg"
"fi_multinode -x rma"
"fi_multinode_coll"
)

Expand Down
12 changes: 6 additions & 6 deletions fabtests/scripts/runmultinode.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

Options=$(getopt --options h:,n:,p:,I:,C:,z: \
--longoptions hosts:,processes-per-node:,provider:,capability:,iterations:,ci:,cleanup,help \
Options=$(getopt --options h:,n:,p:,I:,-x:,z: \
--longoptions hosts:,processes-per-node:,provider:,xfer-method:,iterations:,ci:,cleanup,help \
-- "$@")

eval set -- "$Options"
Expand All @@ -10,7 +10,7 @@ hosts=[]
ppn=1
iterations=1
pattern=""
capability="msg"
xfer-method="msg"
cleanup=false
help=false
ci=""
Expand All @@ -29,8 +29,8 @@ while true; do
pattern="-z $2"; shift 2 ;;
--cleanup)
cleanup=true; shift ;;
-C|--capability)
capability="$2"; shift 2 ;;
-x|--xfer-method)
xfer-method="$2"; shift 2 ;;
--ci)
ci="$2"; shift 2 ;;
--help)
Expand Down Expand Up @@ -65,7 +65,7 @@ output="multinode_server_${num_hosts}_${ppn}.log"
ret=0

if ! $cleanup ; then
cmd="${ci}fi_multinode -n $ranks -s $server -p '$provider' -C $capability $pattern -I $iterations -T"
cmd="${ci}fi_multinode -n $ranks -s $server -p '$provider' -x $xfer-method $pattern -I $iterations -T"
echo $cmd
for node in "${hosts[@]}"; do
for i in $(seq 1 $ppn); do
Expand Down
8 changes: 4 additions & 4 deletions fabtests/test_configs/tcp/io_uring.exclude
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ fi_rma_bw -e msg -o writedata
# ft_sock_recv(): ubertest/uber.c:356, ret=-107 (Transport endpoint is not connected)
fi_ubertest

# fi_multinode -C msg fails with no output
fi_multinode -C msg
# fi_multinode -x msg fails with no output
fi_multinode -x msg

# fi_multinode -C rma fails with no output
fi_multinode -C rma
# fi_multinode -x rma fails with no output
fi_multinode -x rma

0 comments on commit 7ae2c59

Please sign in to comment.