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

BUILD: fix ucs parser set value (#895) #912

Merged
merged 1 commit into from
Feb 1, 2024
Merged
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
12 changes: 11 additions & 1 deletion config/m4/ucx.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2001-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright (c) 2001-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# See file LICENSE for terms.
#

Expand Down Expand Up @@ -118,6 +118,16 @@ AS_IF([test "x$ucx_checked" != "xyes"],[
[AC_DEFINE([UCS_HAVE_RCACHE_REGION_ALIGNMENT], [1], [flags for ucs_rcache_get])],
[],
[#include <ucs/memory/rcache.h>])


AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <ucs/config/parser.h>
int main(int argc, char** argv) {
ucs_config_parser_set_value(NULL, NULL, NULL, NULL, NULL);
return 0;
} ]])],
[AC_DEFINE([UCS_HAVE_PARSER_SET_VALUE_TABLE_PREFIX], [1], [flags for ucs_rcache_get])],
[])

],
[
AS_IF([test "x$with_ucx" != "xguess"],
Expand Down
11 changes: 8 additions & 3 deletions src/utils/ucc_parser.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -168,8 +168,13 @@ static inline ucc_status_t
ucc_config_parser_set_value(void *opts, ucc_config_field_t *fields,
const char *name, const char *value)
{
ucs_status_t status =
ucs_config_parser_set_value(opts, fields, name, value);
ucs_status_t status;

#if UCS_HAVE_PARSER_SET_VALUE_TABLE_PREFIX
status = ucs_config_parser_set_value(opts, fields, NULL, name, value);
#else
status = ucs_config_parser_set_value(opts, fields, name, value);
#endif
return ucs_status_to_ucc_status(status);
}

Expand Down
Loading