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

1902: upgrade CLI11 to v2.2.0 #1904

Merged
merged 2 commits into from
Aug 11, 2022
Merged

1902: upgrade CLI11 to v2.2.0 #1904

merged 2 commits into from
Aug 11, 2022

Conversation

cz4rs
Copy link
Contributor

@cz4rs cz4rs commented Aug 9, 2022

Upgrade CLI11 to the latest release.
Note: this keeps the added namespace vt in the header.

fixes #1902

@github-actions
Copy link

github-actions bot commented Aug 9, 2022

Pipelines results

PR tests (gcc-5, ubuntu, mpich)

Build for b7af7e5

Compilation - successful

Testing - passed

Build log


PR tests (clang-3.9, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (gcc-6, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (clang-5.0, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (gcc-9, ubuntu, mpich, zoltan)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (gcc-8, ubuntu, mpich, address sanitizer)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (gcc-10, ubuntu, openmpi, no LB)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (gcc-7, ubuntu, mpich, trace runtime, LB)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (nvidia cuda 10.1, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (clang-9, ubuntu, mpich)

Build for b7af7e5

Compilation - successful

Testing - passed

Build log


PR tests (clang-13, alpine, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (clang-11, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (intel icpx, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (clang-12, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (nvidia cuda 11.0, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (clang-14, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (gcc-11, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (clang-13, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (intel icpc, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (gcc-12, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


PR tests (clang-10, ubuntu, mpich)

Build for f233f14

Compilation - successful

Testing - passed

Build log


@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #1904 (f233f14) into develop (0633bc9) will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1904      +/-   ##
===========================================
+ Coverage    84.35%   84.44%   +0.08%     
===========================================
  Files          760      760              
  Lines        26834    26833       -1     
===========================================
+ Hits         22636    22658      +22     
+ Misses        4198     4175      -23     
Impacted Files Coverage Δ
src/vt/configs/arguments/args.cc 94.57% <100.00%> (-0.02%) ⬇️
src/vt/vrt/collection/manager.impl.h 96.48% <0.00%> (+0.98%) ⬆️
src/vt/topos/location/location.impl.h 94.09% <0.00%> (+5.90%) ⬆️

Copy link
Member

@PhilMiller PhilMiller left a comment

Choose a reason for hiding this comment

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

This all looks very nice.

Could you confirm that all of the defaults actually matched?

Copy link
Collaborator

@nmm0 nmm0 left a comment

Choose a reason for hiding this comment

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

Looks good to me, also fixes C++17 compile issue

Copy link
Member

@PhilMiller PhilMiller left a comment

Choose a reason for hiding this comment

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

Please work around the Intel CI failure before merging, so that we don't just see that failure on every PR going forward

@PhilMiller
Copy link
Member

FAILED: src/CMakeFiles/vt.dir/Unity/unity_0_cxx.cxx.o 
/usr/bin/ccache /usr/local/bin/mpicxx -DJSON_USE_IMPLICIT_CONVERSIONS=1 -DVT_NO_COLOR_ENABLED -I/vt/lib/CLI -I/build/vt/release -I/vt/src -I/vt/lib/json/include -I/vt/lib/brotli/c/include -I/vt/lib/libfort/lib -isystem /vt/lib/fmt/include -isystem /vt/lib/EngFormat-Cpp/include -isystem /build/checkpoint/install/include -isystem /build/detector/install/include -O3 -DNDEBUG -Wall -pedantic -Wshadow -Wno-unknown-pragmas -Wsign-compare -Werror -fPIC -std=c++14 -MD -MT src/CMakeFiles/vt.dir/Unity/unity_0_cxx.cxx.o -MF src/CMakeFiles/vt.dir/Unity/unity_0_cxx.cxx.o.d -o src/CMakeFiles/vt.dir/Unity/unity_0_cxx.cxx.o -c /build/vt/src/CMakeFiles/vt.dir/Unity/unity_0_cxx.cxx
In file included from /vt/src/vt/configs/arguments/args.cc(54),
                 from /build/vt/src/CMakeFiles/vt.dir/Unity/unity_0_cxx.cxx(9):
/vt/lib/CLI/CLI/CLI11.hpp(8143): error #3280: declaration hides variable "optarg" (declared at line 36 of "/usr/include/x86_64-linux-gnu/bits/getopt_core.h")
                      std::string optarg = args.back();
                                  ^

std::string optarg = args.back();
optarg = op->_validate(optarg, 0);
if(!optarg.empty()) {
std::string cli_optarg = args.back();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that's better than adding Wno-shadow for icpc.
Btw this is already fixed at main branch of CLI11.

auto m = app.add_option("--vt_stack_mod", appConfig.vt_stack_mod, mod, 1);
auto k = app.add_option("--vt_stack_file", appConfig.vt_stack_file, file)->capture_default_str();
auto l = app.add_option("--vt_stack_dir", appConfig.vt_stack_dir, dir)->capture_default_str();
auto m = app.add_option("--vt_stack_mod", appConfig.vt_stack_mod, mod)->capture_default_str();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Difference:

int32_t vt_stack_mod = 0;

auto qf = app.add_option("--vt_trace_flush_size", appConfig.vt_trace_flush_size, tflushmod, 0);
auto o = app.add_option("--vt_trace_file", appConfig.vt_trace_file, tfile)->capture_default_str();
auto p = app.add_option("--vt_trace_dir", appConfig.vt_trace_dir, tdir)->capture_default_str();
auto q = app.add_option("--vt_trace_mod", appConfig.vt_trace_mod, tmod)->capture_default_str();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Difference:

int32_t vt_trace_mod = 0;

auto xy = app.add_option("--vt_lb_data_file_in", appConfig.vt_lb_data_file_in, lb_data_file_in, lbs);
auto wx = app.add_option("--vt_lb_data_dir", appConfig.vt_lb_data_dir, lb_data_dir)->capture_default_str();
auto wy = app.add_option("--vt_lb_data_file", appConfig.vt_lb_data_file, lb_data_file)->capture_default_str();
auto xx = app.add_option("--vt_lb_data_dir_in", appConfig.vt_lb_data_dir_in, lb_data_dir_in)->capture_default_str();
Copy link
Contributor Author

@cz4rs cz4rs Aug 10, 2022

Choose a reason for hiding this comment

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

std::string vt_lb_data_file = "data.%p.json";

vs

  auto lbd = "vt_lb_data";

auto wx = app.add_option("--vt_lb_data_dir", appConfig.vt_lb_data_dir, lb_data_dir)->capture_default_str();
auto wy = app.add_option("--vt_lb_data_file", appConfig.vt_lb_data_file, lb_data_file)->capture_default_str();
auto xx = app.add_option("--vt_lb_data_dir_in", appConfig.vt_lb_data_dir_in, lb_data_dir_in)->capture_default_str();
auto xy = app.add_option("--vt_lb_data_file_in", appConfig.vt_lb_data_file_in, lb_data_file_in)->capture_default_str();
Copy link
Contributor Author

@cz4rs cz4rs Aug 10, 2022

Choose a reason for hiding this comment

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

std::string vt_lb_data_file_in = "data.%p.json";

vs

  auto lbs = "data";

@cz4rs
Copy link
Contributor Author

cz4rs commented Aug 10, 2022

This all looks very nice.

Could you confirm that all of the defaults actually matched?

I have double-checked and noted the differences in the comments.

cz4rs added 2 commits August 11, 2022 15:50
icpc 2021.6.0 shows following warning:
`#3280: declaration hides variable "optarg"
(declared at line 36 of "/usr/include/x86_64-linux-gnu/bits/getopt_core.h")`
@cz4rs cz4rs force-pushed the 1902-upgrade-cli11-lib branch from b7af7e5 to f233f14 Compare August 11, 2022 13:50
@cz4rs
Copy link
Contributor Author

cz4rs commented Aug 11, 2022

Rebased on top of develop.
All the differences regarding default values should only make the --vt_help output more accurate (the ones in args.cc were out of sync).

@PhilMiller PhilMiller merged commit e89215e into develop Aug 11, 2022
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.

Upgrade CLI11 library
3 participants