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

ucc_lib_get_attr doesn't produce output #796

Open
marsaev opened this issue Jun 8, 2023 · 1 comment
Open

ucc_lib_get_attr doesn't produce output #796

marsaev opened this issue Jun 8, 2023 · 1 comment

Comments

@marsaev
Copy link

marsaev commented Jun 8, 2023

After lib handle is created I want to confirm that thread support level is the one that I've requested. However code below:

        ucc_lib_params_t lib_params = {0};
        lib_params.mask = UCC_LIB_PARAM_FIELD_THREAD_MODE;
        lib_params.thread_mode = UCC_THREAD_MULTIPLE;
        CHECK_UCC(ucc_init(&lib_params, lib_config, &lib));

        ucc_lib_attr attrs;
        CHECK_UCC(ucc_lib_get_attr(lib, &attrs));
        printf("UCC thread mode is: %d\n", attrs.thread_mode);
        printf("Available thread modes: UCC_THREAD_SINGLE=%d, UCC_THREAD_FUNNELED=%d, UCC_THREAD_MULTIPLE=%d\n",
            UCC_THREAD_SINGLE, UCC_THREAD_FUNNELED, UCC_THREAD_MULTIPLE);

outputs:

UCC thread mode is: -591294464
Available thread modes: UCC_THREAD_SINGLE=0, UCC_THREAD_FUNNELED=1, UCC_THREAD_MULTIPLE=2

If I initialize attrs with zeros: ucc_lib_attr attrs = {0}; output will be zero, but it feels like ucc_lib_get_attr just doesn't write to ucc_lib_attr output parameter at all.

UCC and UCX versions from HPC-X 2.14

@Sergei-Lebedev
Copy link
Contributor

I think you missed attrs.mask. UCC will skip this field if mask is not set properly.

ucc_lib_attr attrs;
attrs.mask = UCC_LIB_ATTR_FIELD_THREAD_MODE;

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

No branches or pull requests

2 participants