Skip to content

Conversation

snowdrop4
Copy link

@snowdrop4 snowdrop4 commented Apr 7, 2025

Changes

  • Add "results_local" and "results_remote" keys to the JSON when --bidirectional and --report-both are turned on
    • This is in addition to the already-existing "results" key when either of those flags are turned off.
    • These key names mimic the output to STDOUT when --bidirectional and --report-both are turned on
  • Fix bug where different JSONs were being written and rewritten to the same path, up to three times
    • If --bidirectional and --report-both are both given, then print_full_bw_report() was being called three times, and each time it would write out the JSON
    • This means that: first it would write a JSON with the combined results, then it would write a JSON with the local results, then it would write a JSON with the remote results, and you'd be left only with the remote results, because it would overwrite itself each time (with no indication that this happened)
  • Refactor the code a bit to make this all possible:
    • Make a dedicated function for writing out the bandwidth JSON, so we can avoid calling it three times
    • Make a helper function for summing two bandwidth reports, for reporting the aggregate results

Example

ib_send_bw --bidirectional --report_gbits --report-both --size=8388608
{
"test_info": {
"test": "Send_Bidirectional_BW_Test",
"Dual_port": "OFF",
"Device": "mlx5_0",
"Number_of_qps": 1,
"Transport_type": "IB",
"Connection_type": "RC",
"Using_SRQ": "OFF",
"PCIe_relax_order": "ON",
"ibv_wr_API": "ON",
"TX_depth": 128,
"RX_depth": 512,
"CQ_Moderation": 1,
"Mtu": 4096,
"Link_type": "IB",
"Max_inline_data": 0,
"rdma_cm_QPs": "OFF",
"Use_ROCm_memory": "OFF",
"Data_ex_method": "Ethernet"
},
"results": {
"MsgSize": 8388608,
"n_iterations": 1000,
"BW_peak": 709.85,
"BW_average": 674.06,
"MsgRate": 0.010044
},
"results_local": {
"MsgSize": 8388608,
"n_iterations": 1000,
"BW_peak": 346.67,
"BW_average": 331.96,
"MsgRate": 0.004947
},
"results_remote": {
"MsgSize": 8388608,
"n_iterations": 1000,
"BW_peak": 363.18,
"BW_average": 342.10,
"MsgRate": 0.005098
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant