forked from linux-rdma/perftest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmulti_nic_send_buffer
More file actions
69 lines (60 loc) · 1.78 KB
/
multi_nic_send_buffer
File metadata and controls
69 lines (60 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
#
# Wrapper script for multi-NIC RDMA send buffer test
# Runs as client (sender) with configurable NVLink support
#
# Hardcoded configuration
NICS="mlx5_0,mlx5_3,mlx5_4,mlx5_5,mlx5_6,mlx5_9,mlx5_10,mlx5_11"
GPUS="0,1,2,3,4,5,6,7"
# Parse arguments
USE_NVLINK=0
RECV_IP=""
# First, check if receiver IP is provided as positional argument
if [[ $# -gt 0 ]] && [[ ! "$1" =~ ^-- ]]; then
RECV_IP="$1"
shift
fi
# Parse remaining arguments
while [[ $# -gt 0 ]]; do
case $1 in
--allow-nvlink)
USE_NVLINK=1
shift
;;
--help|-h)
echo "Usage: $0 <RECEIVER_IP> [OPTIONS]"
echo ""
echo "Arguments:"
echo " RECEIVER_IP IP address of the receiver (required)"
echo ""
echo "Options:"
echo " --allow-nvlink Enable NVLink transfers (default: disabled, uses --nics-only)"
echo " --help, -h Show this help message"
echo ""
echo "Examples:"
echo " $0 10.52.48.100 # Send with NICs-only mode"
echo " $0 10.52.48.100 --allow-nvlink # Send with NVLink enabled"
exit 0
;;
*)
echo "Unknown option: $1"
echo "Use --help for usage information"
exit 1
;;
esac
done
# Check if receiver IP is provided
if [[ -z "$RECV_IP" ]]; then
echo "Error: Receiver IP address is required"
echo "Usage: $0 <RECEIVER_IP> [OPTIONS]"
echo "Use --help for more information"
exit 1
fi
# Build command
CMD="./test_rdma_multi_qp --nics ${NICS} --gpus ${GPUS} -a ${RECV_IP}"
# Add --nics-only flag if NVLink is not enabled
if [[ $USE_NVLINK -eq 0 ]]; then
CMD="${CMD} --nics-only"
fi
# Execute
exec ${CMD}