Skip to content

CI/FT: Adds fault tolerance CI test#11570

Open
william-gallagher-nv wants to merge 6 commits into
openucx:masterfrom
william-gallagher-nv:fault_tolerance_perftest_ci
Open

CI/FT: Adds fault tolerance CI test#11570
william-gallagher-nv wants to merge 6 commits into
openucx:masterfrom
william-gallagher-nv:fault_tolerance_perftest_ci

Conversation

@william-gallagher-nv

@william-gallagher-nv william-gallagher-nv commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What?

  • Adds Fault Tolerance test using ucx_perftest
  • Adds 'failover' as endpoint failure mode in ucx_perftest

Why?

Allows testing of UCX handling of lane failures.

@william-gallagher-nv

Copy link
Copy Markdown
Contributor Author

/run

@william-gallagher-nv william-gallagher-nv marked this pull request as draft June 24, 2026 02:31
@william-gallagher-nv william-gallagher-nv force-pushed the fault_tolerance_perftest_ci branch 3 times, most recently from d5cd60e to 2675908 Compare June 24, 2026 20:20
- Adds Fault Tolerance CI test using ucx_perftest
- Adds 'failover' as endpoint failure mode in ucx_perftest
@william-gallagher-nv william-gallagher-nv changed the title CI/PERFTEST Add Fault Tolerance CI test CI/FT: Adds fault tolerance CI test Jul 2, 2026
@william-gallagher-nv

Copy link
Copy Markdown
Contributor Author

@svc-nvidia-pr-review

@svc-nvidia-pr-review

Copy link
Copy Markdown

🚫 @william-gallagher-nv — not authorized to trigger a review on this repo. Contact a repo admin to be added to the allowed-users list.

@william-gallagher-nv william-gallagher-nv force-pushed the fault_tolerance_perftest_ci branch from afec5e0 to 806418f Compare July 2, 2026 05:30
@william-gallagher-nv william-gallagher-nv marked this pull request as ready for review July 2, 2026 10:55
@gleon99 gleon99 requested a review from Alexey-Rivkin July 2, 2026 12:33
Comment thread contrib/test_jenkins.sh Outdated

# Run AMO tests
echo -e "4 -s 4\n8 -s 8" > "$ucx_inst_ptest/msg_atomic"
echo -e peer "4 -s 4\n8 -s 8" > "$ucx_inst_ptest/msg_atomic"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look like a perftest option

@gleon99 gleon99 enabled auto-merge (squash) July 5, 2026 08:16
Comment thread contrib/test_jenkins.sh
if [[ $word == */*:* ]]; then
device=${word#*/}
device=${device%%:*}
echo "$device"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we fail if cfg isn’t found? Missing cfg parses as empty, so the final check can pass without seeing any reconfiguration

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a check so that a missing cfg print will fail.

Comment thread contrib/test_jenkins.sh
Comment thread src/tools/perf/perftest.h

#define TL_RESOURCE_NAME_NONE "<none>"
#define TEST_PARAMS_ARGS "t:n:s:W:O:w:D:i:H:oSCIqM:r:E:T:d:x:A:BUem:a:R:lyzL:F:Y:"
#define TEST_PARAMS_ARGS \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requiring an argument for -e breaks existing perftest command lines..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I have updated the places that run ucx_perftest with -e to use -e peer in test_jenkins.sh. Are there other places that needed to be updated? Or would you prefer an entirely new optional to set error mode failover?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-e still requires an argument, breaking existing ucx_perftest -e command lines. Updating the in-tree call site does not preserve compatibility for external users.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe implement like this:

  • no -e -> none
  • -e [none|peer|failover] where "empty" == "peer" for compatibility

@william-gallagher-nv william-gallagher-nv Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • no -e -> none
  • -e [none|peer|failover] where "empty" == "peer" for compatibility

This approach makes sense and allows perftest to stay compatible with external users. But it doesn't map well to get_opt() handling which seems to either always expects an argument or never does. I'll think about how this approach can be implemented.

@william-gallagher-nv william-gallagher-nv Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use :: to allow an optional argument argument for the -e flag.

#define TEST_PARAMS_ARGS \
    "t:n:s:W:O:w:D:i:H:oSCIqM:r:E:T:d:x:A:BUe::m:a:R:lyzL:F:Y:"

The :: implementation is a gnu libc extension that is not required by POSIX. It has the advantage of allowing -e with no argument to map to error handling mode peer. However, it requires merging the flag and the optional argument when an optional argument is used: -epeer or -efailover.

This seems a little awkward and different from the other argument parsing in ucx_perftest. If you think this is OK, let me know.

ep_params.err_handler.cb = ucp_perf_test_err_handler;
ep_params.err_handler.arg = NULL;
ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER;
ep_params.err_mode = perf->params.ucp.err_mode;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing libperf callers set ERR_HANDLING without initializing the new field, so they now get NONE instead of PEER. Can we preserve PEER as the default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if existing libperf callers set ERR_HANDLING via -e flag with no following value, they will likely get a parser error. I am happy to update any tests that currently use -e to e peer. In order to preserve complete backwards compatibility, we could leave -e for error handling mode peer and use -f for failover mode. It seem more intituitive to me to use -e failover and -e peer instead of -e and -f. But let me know what you prefer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing direct libperf callers using UCX_PERF_TEST_FLAG_ERR_HANDLING still receive UCP_ERR_HANDLING_MODE_NONE when the new field is zero-initialized. Initializing it in the CLI path does not fix library callers..

Comment thread contrib/test_jenkins.sh Outdated
Comment thread contrib/test_jenkins.sh Outdated
Adds handling for detecting a missing protocol reconfiguration print in
perftest stdout. Also removes the use of tee in when piping perftest
stdout to a file.

@gleon99 gleon99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See last comments

Comment thread contrib/test_jenkins.sh
parse_active_devices() {
file=$1
config_cnt=$2
found=0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is never set to 1.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

Comment thread src/tools/perf/perftest.h

#define TL_RESOURCE_NAME_NONE "<none>"
#define TEST_PARAMS_ARGS "t:n:s:W:O:w:D:i:H:oSCIqM:r:E:T:d:x:A:BUem:a:R:lyzL:F:Y:"
#define TEST_PARAMS_ARGS \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-e still requires an argument, breaking existing ucx_perftest -e command lines. Updating the in-tree call site does not preserve compatibility for external users.

ep_params.err_handler.cb = ucp_perf_test_err_handler;
ep_params.err_handler.arg = NULL;
ep_params.err_mode = UCP_ERR_HANDLING_MODE_PEER;
ep_params.err_mode = perf->params.ucp.err_mode;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing direct libperf callers using UCX_PERF_TEST_FLAG_ERR_HANDLING still receive UCP_ERR_HANDLING_MODE_NONE when the new field is zero-initialized. Initializing it in the CLI path does not fix library callers..

Comment thread src/tools/perf/api/libperf.h Outdated
ucp_perf_datatype_t recv_datatype;
size_t am_hdr_size; /* UCP Active Message header size
(not included in message size) */
ucp_err_handling_mode_t err_mode; /* UCP endpoint error handling

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: comment alignment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread src/tools/perf/perftest.h

#define TL_RESOURCE_NAME_NONE "<none>"
#define TEST_PARAMS_ARGS "t:n:s:W:O:w:D:i:H:oSCIqM:r:E:T:d:x:A:BUem:a:R:lyzL:F:Y:"
#define TEST_PARAMS_ARGS \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe implement like this:

  • no -e -> none
  • -e [none|peer|failover] where "empty" == "peer" for compatibility

Comment on lines +169 to +170
printf(" peer - peer failure error handling\n");
printf(" failover - lane failover error handling\n");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would extend with "none"

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.

5 participants