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

2216: Allow fmt to be used as external lib #2221

Merged
merged 15 commits into from
Apr 30, 2024

Conversation

JacobDomagala
Copy link
Contributor

Fixes #2216

@JacobDomagala JacobDomagala self-assigned this Nov 28, 2023
@JacobDomagala JacobDomagala linked an issue Nov 28, 2023 that may be closed by this pull request
Copy link

github-actions bot commented Nov 28, 2023

Pipelines results

PR tests (gcc-12, ubuntu, mpich)

Build for 57c2ec8 (2024-04-19 12:06:33 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-9, ubuntu, mpich)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


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

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-11, ubuntu, mpich)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-12, ubuntu, mpich)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (nvidia cuda 11.2, gcc-9, ubuntu, mpich)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

/vt/src/vt/pipe/pipe_manager.impl.h(133): warning: missing return statement at end of non-void function "vt::pipe::PipeManager::makeSend<f,Target>(Target) [with f=&vt::vrt::collection::lb::GreedyLB::collectHandler, Target=vt::objgroup::proxy::ProxyElm<vt::vrt::collection::lb::GreedyLB>]"
          detected during:
            instantiation of "auto vt::pipe::PipeManager::makeSend<f,Target>(Target) [with f=&vt::vrt::collection::lb::GreedyLB::collectHandler, Target=vt::objgroup::proxy::ProxyElm<vt::vrt::collection::lb::GreedyLB>]" 
/vt/src/vt/objgroup/proxy/proxy_objgroup.impl.h(202): here
            instantiation of "vt::objgroup::proxy::Proxy<ObjT>::PendingSendType vt::objgroup::proxy::Proxy<ObjT>::reduce<f,Op,Target,Args...>(Target, Args &&...) const [with ObjT=vt::vrt::collection::lb::GreedyLB, f=&vt::vrt::collection::lb::GreedyLB::collectHandler, Op=vt::collective::PlusOp, Target=vt::objgroup::proxy::ProxyElm<vt::vrt::collection::lb::GreedyLB>, Args=<vt::vrt::collection::lb::GreedyPayload>]" 
/vt/src/vt/vrt/collection/balance/greedylb/greedylb.cc(222): here

/vt/src/vt/pipe/pipe_manager.impl.h(133): warning: missing return statement at end of non-void function "vt::pipe::PipeManager::makeSend<f,Target>(Target) [with f=&MyObj::handler, Target=vt::objgroup::proxy::ProxyElm<MyObj>]"
          detected during instantiation of "auto vt::pipe::PipeManager::makeSend<f,Target>(Target) [with f=&MyObj::handler, Target=vt::objgroup::proxy::ProxyElm<MyObj>]" 
/vt/examples/callback/callback.cc(147): here

/vt/src/vt/pipe/pipe_manager.impl.h(133): warning: missing return statement at end of non-void function "vt::pipe::PipeManager::makeSend<f,Target>(Target) [with f=&colHan, Target=vt::vrt::collection::VrtElmProxy<MyCol, vt::Index1D>]"
          detected during instantiation of "auto vt::pipe::PipeManager::makeSend<f,Target>(Target) [with f=&colHan, Target=vt::vrt::collection::VrtElmProxy<MyCol, vt::Index1D>]" 
/vt/examples/callback/callback.cc(153): here

/vt/src/vt/pipe/pipe_manager.impl.h(133): warning: missing return statement at end of non-void function "vt::pipe::PipeManager::makeSend<f,Target>(Target) [with f=&MyObj::handler, Target=vt::objgroup::proxy::ProxyElm<MyObj>]"
          detected during instantiation of "auto vt::pipe::PipeManager::makeSend<f,Target>(Target) [with f=&MyObj::handler, Target=vt::objgroup::proxy::ProxyElm<MyObj>]" 
/vt/examples/callback/callback.cc(147): here

/vt/src/vt/pipe/pipe_manager.impl.h(133): warning: missing return statement at end of non-void function "vt::pipe::PipeManager::makeSend<f,Target>(Target) [with f=&colHan, Target=vt::vrt::collection::VrtElmProxy<MyCol, vt::Index1D>]"
          detected during instantiation of "auto vt::pipe::PipeManager::makeSend<f,Target>(Target) [with f=&colHan, Target=vt::vrt::collection::VrtElmProxy<MyCol, vt::Index1D>]" 
/vt/examples/callback/callback.cc(153%0D%0A%0D%0A%0D%0A ==> And there is more. Read log. <==

Build log


PR tests (gcc-9, ubuntu, mpich, zoltan, json schema test)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-13, ubuntu, mpich)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-14, ubuntu, mpich)

Build for 57c2ec8 (2024-04-19 12:06:33 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-10, ubuntu, mpich)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (gcc-11, ubuntu, mpich, trace runtime, coverage)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


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

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (intel icpc, ubuntu, mpich)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-13, alpine, mpich)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (intel icpx, ubuntu, mpich)

Build for 57c2ec8 (2024-04-19 12:06:33 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (nvidia cuda 12.2.0, gcc-9, ubuntu, mpich)

Build for 57c2ec8 (2024-04-19 12:06:33 UTC)

/vt/lib/CLI/CLI/CLI11.hpp(1029): warning #2361-D: invalid narrowing conversion from "double" to "unsigned long"
          TT { std::declval<CC>() }
               ^
          detected during:
            instantiation of "vt::CLI::detail::is_direct_constructible<T, C>::test [with T=std::vector<std::string, std::allocator<std::string>>, C=double]" based on template arguments <std::vector<std::string, std::allocator<std::string>>, double> at line 1041
            instantiation of class "vt::CLI::detail::is_direct_constructible<T, C> [with T=std::vector<std::string, std::allocator<std::string>>, C=double]" at line 5005
            instantiation of "void vt::CLI::Option::results(T &) const [with T=std::vector<std::string, std::allocator<std::string>>]" at line 5034
            instantiation of "T vt::CLI::Option::as<T>() const [with T=std::vector<std::string, std::allocator<std::string>>]" at line 7315

Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"

/vt/lib/CLI/CLI/CLI11.hpp(1029): warning #2361-D: invalid narrowing conversion from "int" to "unsigned long"
          TT { std::declval<CC>() }
               ^
          detected during:
            instantiation of "vt::CLI::detail::is_direct_constructible<T, C>::test [with T=std::vector<std::string, std::allocator<std::string>>, C=int]" based on template arguments <std::vector<std::string, std::allocator<std::string>>, int> at line 1041
            instantiation of class "vt::CLI::detail::is_direct_constructible<T, C> [with T=std::vector<std::string, std::allocator<std::string>>, C=int]" at line 5005
            instantiation of "void vt::CLI::Option::results(T &) const [with T=std::vector<std::string, std::allocator<std::string>>]" at line 5034
            instantiation of "T vt::CLI::Option::as<T>() const [with T=std::vector<std::string, std::allocator<std::string>>]" at line 7315

Testing - passed

Build log


PR tests (intel icpx, ubuntu, mpich, verbose)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (gcc-12, ubuntu, mpich, verbose)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-14, ubuntu, mpich, verbose)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (nvidia cuda 12.2.0, gcc-9, ubuntu, mpich, verbose)

Build for 4a64c6e (2024-04-30 18:38:08 UTC)

/vt/lib/CLI/CLI/CLI11.hpp(1029): warning #2361-D: invalid narrowing conversion from "double" to "unsigned long"
          TT { std::declval<CC>() }
               ^
          detected during:
            instantiation of "vt::CLI::detail::is_direct_constructible<T, C>::test [with T=std::vector<std::string, std::allocator<std::string>>, C=double]" based on template arguments <std::vector<std::string, std::allocator<std::string>>, double> at line 1041
            instantiation of class "vt::CLI::detail::is_direct_constructible<T, C> [with T=std::vector<std::string, std::allocator<std::string>>, C=double]" at line 5005
            instantiation of "void vt::CLI::Option::results(T &) const [with T=std::vector<std::string, std::allocator<std::string>>]" at line 5034
            instantiation of "T vt::CLI::Option::as<T>() const [with T=std::vector<std::string, std::allocator<std::string>>]" at line 7315

Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"

/vt/lib/CLI/CLI/CLI11.hpp(1029): warning #2361-D: invalid narrowing conversion from "int" to "unsigned long"
          TT { std::declval<CC>() }
               ^
          detected during:
            instantiation of "vt::CLI::detail::is_direct_constructible<T, C>::test [with T=std::vector<std::string, std::allocator<std::string>>, C=int]" based on template arguments <std::vector<std::string, std::allocator<std::string>>, int> at line 1041
            instantiation of class "vt::CLI::detail::is_direct_constructible<T, C> [with T=std::vector<std::string, std::allocator<std::string>>, C=int]" at line 5005
            instantiation of "void vt::CLI::Option::results(T &) const [with T=std::vector<std::string, std::allocator<std::string>>]" at line 5034
            instantiation of "T vt::CLI::Option::as<T>() const [with T=std::vector<std::string, std::allocator<std::string>>]" at line 7315

Testing - passed

Build log


@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch from a5963f1 to d537fd6 Compare November 28, 2023 12:10
@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch 4 times, most recently from 4dbe64a to bf7cce1 Compare December 12, 2023 17:48
@JacobDomagala JacobDomagala marked this pull request as ready for review December 12, 2023 17:49
@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch 2 times, most recently from 807f2e7 to a97d9fa Compare December 12, 2023 20:34
@JacobDomagala
Copy link
Contributor Author

JacobDomagala commented Dec 13, 2023

Looks like newer versions of fmt start to cause issues on nvcc build. I've tested it locally and they're gone on version 12.3.

Given that we probably want to support 11.2 for a while, we could fix them with using external fmt (7.1.3 version), at least to satisfy CIs, or should we rollback the bundled version to 7.1.3? 🤔

@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch 3 times, most recently from 1783629 to 9f8dd40 Compare December 19, 2023 10:12
@JacobDomagala
Copy link
Contributor Author

I updated the CUDA pipeline to use external fmt (version 7.1.3)

@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch 3 times, most recently from 0227d7e to 4bf6694 Compare December 20, 2023 23:46
@JacobDomagala
Copy link
Contributor Author

@lifflander Rolled back fmt to 7.1.3

@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch from 4bf6694 to 0da91f5 Compare January 16, 2024 12:34
@JacobDomagala JacobDomagala changed the title 2216: Update fmt lib 2216: Allow 'fmt' to be used as external lib Jan 16, 2024
@JacobDomagala JacobDomagala changed the title 2216: Allow 'fmt' to be used as external lib 2216: Allow fmt to be used as external lib Jan 16, 2024
@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch from 0da91f5 to e637943 Compare January 23, 2024 15:59
@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch from e637943 to f1ec391 Compare January 30, 2024 17:24
@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch 2 times, most recently from afb65d6 to 34c5cbc Compare February 20, 2024 17:00
@lifflander
Copy link
Collaborator

@nmm0 I believe we are waiting on your review for this.

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.

We need to add the following in vtConfig.cmake.in:

if (@vt_external_fmt@)
  set (fmt_DIR @fmt_DIR@)
  find_dependency(fmt REQUIRED HINTS @fmt_DIR@)
endif()

So that the dependency will find fmt at the same place that vt had it

# use included fmt or external one
if(${vt_external_fmt})
# user should provide 'fmt_DIR' to CMake (unless fmt is installed in system libs)
if(fmt_DIR)
Copy link
Collaborator

Choose a reason for hiding this comment

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

fmt_ROOT should also be valid here

@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch from 34c5cbc to 57c2ec8 Compare April 19, 2024 12:06
@JacobDomagala
Copy link
Contributor Author

Thanks @nmm0 for the review!
I updated the PR. Had to make few changes to source code, as the previous version wasn't compiling with external fmt (with most recent version of fmt).

@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch from 57c2ec8 to 1489dd1 Compare April 23, 2024 16:16
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, thank you for doing this :)

src/vt/collective/reduce/reduce_manager.h Show resolved Hide resolved
@lifflander
Copy link
Collaborator

@JacobDomagala Can you rebase this PR?

@JacobDomagala JacobDomagala force-pushed the 2216-fmt-library-incompatibilities branch from 1489dd1 to 4a64c6e Compare April 30, 2024 18:38
@lifflander lifflander merged commit a4a29a2 into develop Apr 30, 2024
26 checks passed
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.

fmt library incompatibilities
3 participants