Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set UCT parameters from UCP API #209

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

changchengx
Copy link

Backport below PR from master to integration3 branch
openucx#7019

Signed-off-by: Changcheng Liu jerrliu@nvidia.com

Backport below PR from master to integration3 branch
openucx#7019

Signed-off-by: Changcheng Liu <jerrliu@nvidia.com>
@changchengx
Copy link
Author

changchengx commented Sep 26, 2021

Example:
Default IB_RX_QUEUE_LEN under transports

[jerrliu@gen-l-vrt-307 ucx]$ ./install/bin/ucx_info -c | grep 'RX_QUEUE_LEN\>'
UCX_RC_VERBS_RX_QUEUE_LEN=4095
UCX_RC_MLX5_RX_QUEUE_LEN=4095
UCX_DC_MLX5_RX_QUEUE_LEN=4095
UCX_UD_VERBS_RX_QUEUE_LEN=4096
UCX_UD_MLX5_RX_QUEUE_LEN=4096

call ucp_config_modify to cached the right UCT configurations

[jerrliu@gen-l-vrt-307 ucx]$ git diff
diff --git a/test/examples/ucp_hello_world.c b/test/examples/ucp_hello_world.c
index 032f4b15d..d3c5e6412 100644
--- a/test/examples/ucp_hello_world.c
+++ b/test/examples/ucp_hello_world.c
@@ -465,6 +465,8 @@ int main(int argc, char **argv)
     status = ucp_config_read(NULL, NULL, &config);
     CHKERR_JUMP(status != UCS_OK, "ucp_config_read\n", err);
 
+    ucp_config_modify(config, "IB_RX_QUEUE_LEN", "8192");
+
     ucp_params.field_mask   = UCP_PARAM_FIELD_FEATURES |
                               UCP_PARAM_FIELD_REQUEST_SIZE |
                               UCP_PARAM_FIELD_REQUEST_INIT;

Print the cached UCT configuration

[jerrliu@gen-l-vrt-307 ucx]$ stdbuf -o0 ./test/examples/ucp_hello_world  | grep 'IB_RX_QUEUE_LEN=8192'
IB_RX_QUEUE_LEN=8192

Below log shows that the cached right UCT configurations are applied

[jerrliu@gen-l-vrt-307 ucx]$ UCX_LOG_LEVEL=Debug stdbuf -o0 ./test/examples/ucp_hello_world  | grep 'apply uct configuration'
INFO: UCP_HELLO_WORLD mode = 0 server = (null) port = 13337
[1632638434.130861] [gen-l-vrt-307:1173892:0]    ucp_context.c:495  UCX  DEBUG apply uct configuration IB_RX_QUEUE_LEN=8192
[1632638434.136542] [gen-l-vrt-307:1173892:0]    ucp_context.c:495  UCX  DEBUG apply uct configuration IB_RX_QUEUE_LEN=8192
[1632638434.144211] [gen-l-vrt-307:1173892:0]    ucp_context.c:495  UCX  DEBUG apply uct configuration IB_RX_QUEUE_LEN=8192
[1632638434.185955] [gen-l-vrt-307:1173892:0]    ucp_context.c:495  UCX  DEBUG apply uct configuration IB_RX_QUEUE_LEN=8192
[1632638434.197096] [gen-l-vrt-307:1173892:0]    ucp_context.c:495  UCX  DEBUG apply uct configuration IB_RX_QUEUE_LEN=8192

call ucp_config_modify to cached the wrong UCT configurations

[jerrliu@gen-l-vrt-307 ucx]$ git diff
diff --git a/test/examples/ucp_hello_world.c b/test/examples/ucp_hello_world.c
index 032f4b15d..0e1612484 100644
--- a/test/examples/ucp_hello_world.c
+++ b/test/examples/ucp_hello_world.c
@@ -465,6 +465,8 @@ int main(int argc, char **argv)
     status = ucp_config_read(NULL, NULL, &config);
     CHKERR_JUMP(status != UCS_OK, "ucp_config_read\n", err);
 
+    ucp_config_modify(config, "NOEXISTED_UCT_KEY", "dummy_val");
+
     ucp_params.field_mask   = UCP_PARAM_FIELD_FEATURES |
                               UCP_PARAM_FIELD_REQUEST_SIZE |
                               UCP_PARAM_FIELD_REQUEST_INIT;

Below log shows that the cached wrong UCT configurations are not applied

[jerrliu@gen-l-vrt-307 ucx]$ stdbuf -o0 ./test/examples/ucp_hello_world -n 192.168.30.6 2>&1 | grep 'unused cached uct'
[1632798667.496143] [gen-l-vrt-307:1401205:0]     ucp_worker.c:1687 UCX  WARN  unused cached uct configuration: NOEXISTED_UCT_KEY

Note: the warning could only be called at the end of ucp_worker_create

@changchengx
Copy link
Author

@yosefe This is the PR to set UCT configurations through UCP API and it's required by customers.

@yosefe yosefe merged commit 950f90c into yosefe:integration3 Sep 27, 2021
@changchengx changchengx deleted the ucp_api_set_uct branch September 28, 2021 06:36
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.

2 participants