Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions src/cart/crt_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ data_init(int server, crt_init_options_t *opt)
unsigned int mrecv_buf = CRT_HG_MRECV_BUF;
unsigned int mrecv_buf_copy = 0; /* buf copy disabled by default */
char *swim_traffic_class = NULL;
uint32_t mrc_enable = 0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why not make it a boolean ?

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.

needs to be uint32_t for crt_env stuff. server is also currently defined as int, so changing all to bools would be messier in this pr

int rc = 0;

crt_env_dump();
Expand Down Expand Up @@ -351,8 +352,17 @@ data_init(int server, crt_init_options_t *opt)

/* This is a workaround for CART-871 if universe size is not set */
crt_env_get(FI_UNIVERSE_SIZE, &fi_univ_size);
if (fi_univ_size == 0) {
if (fi_univ_size == 0)
d_setenv("FI_UNIVERSE_SIZE", "2048", 1);

/* Disable MRC on servers and enable on clients by default */
mrc_enable = server ? 0 : 1;
Copy link
Copy Markdown
Collaborator

@soumagne soumagne Apr 8, 2026

Choose a reason for hiding this comment

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

Suggested change
mrc_enable = server ? 0 : 1;
mrc_enable = !server;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i believe it is clearer to keep the original and spell out the two cases explicitly with "?"

crt_env_get(CRT_MRC_ENABLE, &mrc_enable);

if (mrc_enable == 0) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (mrc_enable == 0) {
if (!mrc_enable) {

D_INFO("Disabling mr caching\n");
d_setenv("FI_MR_CACHE_MAX_COUNT", "0", 1);
d_setenv("UCX_RCACHE_ENABLE", "n", 1);
}

/** enable sensors if requested */
Expand Down Expand Up @@ -549,8 +559,6 @@ file_limit_bump(void)
static void
prov_settings_apply(bool primary, crt_provider_t prov, crt_init_options_t *opt)
{
uint32_t mrc_enable = 0;

/* Avoid applying same settings multiple times */
if (g_prov_settings_applied[prov] == true)
return;
Expand All @@ -567,15 +575,6 @@ prov_settings_apply(bool primary, crt_provider_t prov, crt_init_options_t *opt)
if (prov == CRT_PROV_OFI_TCP || prov == CRT_PROV_OFI_TCP_RXM)
file_limit_bump();

if (prov == CRT_PROV_OFI_CXI)
mrc_enable = 1;

crt_env_get(CRT_MRC_ENABLE, &mrc_enable);
if (mrc_enable == 0) {
D_INFO("Disabling MR CACHE (FI_MR_CACHE_MAX_COUNT=0)\n");
d_setenv("FI_MR_CACHE_MAX_COUNT", "0", 1);
}

g_prov_settings_applied[prov] = true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/cart/corpc/corpc_five_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ENV:
default:
# !filter-only : /run/tests/corpc_prefwd
- D_LOG_MASK: "WARN,CORPC=DEBUG"
- D_LOG_MASK: "INFO,CORPC=DEBUG"
- D_INTERFACE: "eth0"
- test_servers_CRT_CTX_NUM: "0"
env_D_PROVIDER: !mux
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/cart/corpc/corpc_one_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ENV:
default:
# !filter-only : /run/tests/corpc_prefwd
- D_LOG_MASK: "WARN,CORPC=DEBUG"
- D_LOG_MASK: "INFO,CORPC=DEBUG"
- D_INTERFACE: "eth0"
- test_servers_CRT_CTX_NUM: "16"
env_D_PROVIDER: !mux
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/cart/corpc/corpc_two_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ENV:
default:
# !filter-only : /run/tests/corpc_prefwd
- D_LOG_MASK: "WARN,CORPC=DEBUG"
- D_LOG_MASK: "INFO,CORPC=DEBUG"
- D_INTERFACE: "eth0"
- test_servers_CRT_CTX_NUM: "16"
env_D_PROVIDER: !mux
Expand Down
Loading