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

How to link and use CL and TL library? #1061

Open
MoFHeka opened this issue Dec 24, 2024 · 0 comments
Open

How to link and use CL and TL library? #1061

MoFHeka opened this issue Dec 24, 2024 · 0 comments

Comments

@MoFHeka
Copy link

MoFHeka commented Dec 24, 2024

When I link libucc_tl_self, libucc_tl_ucp, libucc_cl_hier and libucc_cl_basic to the test code, a core dump occurred.
Maybe I made a mistake. Unlink the UCX, is the program only needed to link libucc can already use CL, TL, EC, MC and other features?
When use static linking to libucc, the program raise error.

main: ucc_examples/cmake/main.cpp:9: int main(int, char**): Assertion `st == UCC_OK' failed.
Aborted (core dumped)

main.cpp

#include <ucc/api/ucc.h>
#include <cassert>

int main(int argc, char *argv[]) {
  ucc_status_t st;

  ucc_lib_config_h lib_config;
  st = ucc_lib_config_read(nullptr, nullptr, &lib_config);
  assert(st == UCC_OK);

  ucc_lib_params_t lib_params = {};
  lib_params.mask = UCC_LIB_PARAM_FIELD_THREAD_MODE;
  lib_params.thread_mode = UCC_THREAD_MULTIPLE;

  ucc_lib_h lib;
  st = ucc_init(&lib_params, lib_config, &lib);
  assert(st == UCC_OK);

  ucc_lib_config_release(lib_config);
  ucc_finalize(lib);
  return 0;
}
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

1 participant