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

2091: fix missing return statement warning #2106

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

cz4rs
Copy link
Contributor

@cz4rs cz4rs commented Mar 14, 2023

fixes #2091

@github-actions
Copy link

github-actions bot commented Mar 14, 2023

Pipelines results

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

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-9, ubuntu, mpich)

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


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

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


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

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-13, ubuntu, mpich)

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-12, ubuntu, mpich)

Build for ba98f55 (2023-03-15 20:42:56 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-14, ubuntu, mpich)

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-11, ubuntu, mpich)

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


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

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (nvidia cuda 11.0, ubuntu, mpich)

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

/vt/src/vt/objgroup/proxy/proxy_objgroup_elm.impl.h(98): warning: missing return statement at end of non-void function "vt::objgroup::proxy::ProxyElm<ObjT>::send<fn,Args...>(Args &&...) const [with ObjT=NodeObj, fn=&NodeObj::perfMakeRunnable, Args=<>]"
          detected during instantiation of "vt::objgroup::proxy::ProxyElm<ObjT>::PendingSendType vt::objgroup::proxy::ProxyElm<ObjT>::send<fn,Args...>(Args &&...) const [with ObjT=NodeObj, fn=&NodeObj::perfMakeRunnable, Args=<>]" 
/vt/tests/perf/collection_local_send.cc(120): here

/vt/src/vt/vrt/collection/send/sendable.impl.h(156): warning: missing return statement at end of non-void function "vt::vrt::collection::Sendable<ColT, IndexT, BaseProxyT>::send<f,Args...>(Args &&...) const [with ColT=vt::tests::unit::comm::<unnamed>::MyCol, IndexT=vt::Index1D, BaseProxyT=vt::vrt::collection::elm_proxy::Chain2<vt::tests::unit::comm::<unnamed>::MyCol, vt::Index1D>, f=&vt::tests::unit::comm::<unnamed>::handler2, Args=<>]"
          detected during instantiation of "vt::messaging::PendingSend vt::vrt::collection::Sendable<ColT, IndexT, BaseProxyT>::send<f,Args...>(Args &&...) const [with ColT=vt::tests::unit::comm::<unnamed>::MyCol, IndexT=vt::Index1D, BaseProxyT=vt::vrt::collection::elm_proxy::Chain2<vt::tests::unit::comm::<unnamed>::MyCol, vt::Index1D>, f=&vt::tests::unit::comm::<unnamed>::handler2, Args=<>]" 
/vt/tests/unit/lb/test_lb_data_comm.cc(165): here

/vt/src/vt/vrt/collection/broadcast/broadcastable.impl.h(200): warning: missing return statement at end of non-void function "vt::vrt::collection::Broadcastable<ColT, IndexT, BaseProxyT>::broadcast<f,Args...>(Args &&...) const [with ColT=vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, IndexT=vt::tests::unit::TestIndex, BaseProxyT=vt::vrt::collection::col_proxy::Chain4<vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, vt::tests::unit::TestIndex>, f=&vt::tests::unit::bcast::BroadcastHandlers<vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, vt::tests::unit::bcast::bcast_col_::ColMsg<int32_t>, std::tuple<int32_t>>::handler, Args=<std::tuple<int32_t> &>]"
          detected during:
            instantiation of "vt::messaging::PendingSend vt::vrt::collection::Broadcastable<ColT, IndexT, BaseProxyT>::broadcast<f,Args...>(Args &&...) const [with ColT=vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, IndexT=vt::tests::unit::TestIndex, BaseProxyT=vt::vrt::collection::col_proxy::Chain4<vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, vt::tests::unit::TestIndex>, f=&vt::tests::unit::bcast::BroadcastHandlers<vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, vt::tests::unit::bcast::bcast_col_::ColMsg<int32_t>, std::tuple<int32_t>>::handler, Args=<std::tuple<int32_t> &>]" 
/vt/tests/unit/collection/test_broadcast.h(135): here
            instantiation of "void vt::tests::unit::bcast::test_broadcast_1<ColType>(const std::string &) [with ColType=vt::tests::unit::bcast%0D%0A%0D%0A%0D%0A ==> And there is more. Read log. <==

Build log


PR tests (gcc-12, ubuntu, mpich)

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


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

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (clang-10, ubuntu, mpich)

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

Compilation - successful

Testing - passed

Build log


PR tests (intel icpc, ubuntu, mpich)

Build for f3d2f04 (2023-03-21 18:56:38 UTC)

intel-cc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
intel-cc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
intel-cc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
intel-cc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
intel-cc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
intel-cc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
intel-cc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
intel-cc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
intel-cc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.-%0D%0A%0D%0A%0D%0A ==> And there is more. Read log. <==

Build log


PR tests (nvidia cuda 11.2, ubuntu, mpich)

Build for ( UTC)

/vt/src/vt/objgroup/proxy/proxy_objgroup_elm.impl.h(98): warning: missing return statement at end of non-void function "vt::objgroup::proxy::ProxyElm<ObjT>::send<fn,Args...>(Args &&...) const [with ObjT=NodeObj, fn=&NodeObj::perfMakeRunnable, Args=<>]"
          detected during instantiation of "vt::objgroup::proxy::ProxyElm<ObjT>::PendingSendType vt::objgroup::proxy::ProxyElm<ObjT>::send<fn,Args...>(Args &&...) const [with ObjT=NodeObj, fn=&NodeObj::perfMakeRunnable, Args=<>]" 
/vt/tests/perf/collection_local_send.cc(120): here

/vt/src/vt/vrt/collection/send/sendable.impl.h(156): warning: missing return statement at end of non-void function "vt::vrt::collection::Sendable<ColT, IndexT, BaseProxyT>::send<f,Args...>(Args &&...) const [with ColT=vt::tests::unit::comm::<unnamed>::MyCol, IndexT=vt::Index1D, BaseProxyT=vt::vrt::collection::elm_proxy::Chain2<vt::tests::unit::comm::<unnamed>::MyCol, vt::Index1D>, f=&vt::tests::unit::comm::<unnamed>::handler2, Args=<>]"
          detected during instantiation of "vt::messaging::PendingSend vt::vrt::collection::Sendable<ColT, IndexT, BaseProxyT>::send<f,Args...>(Args &&...) const [with ColT=vt::tests::unit::comm::<unnamed>::MyCol, IndexT=vt::Index1D, BaseProxyT=vt::vrt::collection::elm_proxy::Chain2<vt::tests::unit::comm::<unnamed>::MyCol, vt::Index1D>, f=&vt::tests::unit::comm::<unnamed>::handler2, Args=<>]" 
/vt/tests/unit/lb/test_lb_data_comm.cc(165): here

/vt/src/vt/vrt/collection/broadcast/broadcastable.impl.h(200): warning: missing return statement at end of non-void function "vt::vrt::collection::Broadcastable<ColT, IndexT, BaseProxyT>::broadcast<f,Args...>(Args &&...) const [with ColT=vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, IndexT=vt::tests::unit::TestIndex, BaseProxyT=vt::vrt::collection::col_proxy::Chain4<vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, vt::tests::unit::TestIndex>, f=&vt::tests::unit::bcast::BroadcastHandlers<vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, vt::tests::unit::bcast::bcast_col_::ColMsg<int32_t>, std::tuple<int32_t>>::handler, Args=<std::tuple<int32_t> &>]"
          detected during:
            instantiation of "vt::messaging::PendingSend vt::vrt::collection::Broadcastable<ColT, IndexT, BaseProxyT>::broadcast<f,Args...>(Args &&...) const [with ColT=vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, IndexT=vt::tests::unit::TestIndex, BaseProxyT=vt::vrt::collection::col_proxy::Chain4<vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, vt::tests::unit::TestIndex>, f=&vt::tests::unit::bcast::BroadcastHandlers<vt::tests::unit::bcast::bcast_col_::TestCol<int32_t>, vt::tests::unit::bcast::bcast_col_::ColMsg<int32_t>, std::tuple<int32_t>>::handler, Args=<std::tuple<int32_t> &>]" 
/vt/tests/unit/collection/test_broadcast.h(135): here
            instantiation of "void vt::tests::unit::bcast::test_broadcast_1<ColType>(const std::string &) [with ColType=vt::tests::unit::bcast%0D%0A%0D%0A%0D%0A ==> And there is more. Read log. <==

Build log


@PhilMiller
Copy link
Member

icpx build was warning-free

@PhilMiller
Copy link
Member

nvcc 11 still has the warning

@PhilMiller
Copy link
Member

nvcc 11.2 as well as 11.0 :-(

@PhilMiller
Copy link
Member

icpc was clean. This might be the best we can do

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.

We may have to convert runLambda back into a pair of specializations based on enable_if if we actually want to silence the warning across all compilers.

@cz4rs cz4rs force-pushed the 2091-missing-return-statement branch from 4930373 to ba98f55 Compare March 15, 2023 20:43
@lifflander lifflander self-requested a review March 16, 2023 18:24
@cz4rs cz4rs marked this pull request as draft March 17, 2023 11:09
@cz4rs
Copy link
Contributor Author

cz4rs commented Mar 17, 2023

Converting to draft as there are more warnings showing up:

/vt/src/vt/objgroup/proxy/proxy_objgroup_elm.impl.h(98)

template <typename ObjT>
template <auto f, typename... Params>
typename ProxyElm<ObjT>::PendingSendType
ProxyElm<ObjT>::send(Params&&... params) const {
using MsgT = typename ObjFuncTraits<decltype(f)>::MsgT;
if constexpr (std::is_same_v<MsgT, NoMsg>) {
using Tuple = typename ObjFuncTraits<decltype(f)>::TupleType;
using SendMsgT = messaging::ParamMsg<Tuple>;
auto msg = vt::makeMessage<SendMsgT>(std::forward<Params>(params)...);
auto const ctrl = proxy::ObjGroupProxy::getID(proxy_);
auto const han = auto_registry::makeAutoHandlerObjGroupParam<
ObjT, decltype(f), f, SendMsgT
>(ctrl);
return theObjGroup()->send(msg, han, node_);
} else {
auto msg = makeMessage<MsgT>(std::forward<Params>(params)...);
return sendMsg<MsgT, f>(msg);
}
}

/vt/src/vt/objgroup/proxy/proxy_objgroup.impl.h(105)

template <typename ObjT>
template <auto f, typename... Params>
typename Proxy<ObjT>::PendingSendType
Proxy<ObjT>::broadcast(Params&&... params) const {
using MsgT = typename ObjFuncTraits<decltype(f)>::MsgT;
if constexpr (std::is_same_v<MsgT, NoMsg>) {
using Tuple = typename ObjFuncTraits<decltype(f)>::TupleType;
using SendMsgT = messaging::ParamMsg<Tuple>;
auto msg = vt::makeMessage<SendMsgT>(std::forward<Params>(params)...);
auto const ctrl = proxy::ObjGroupProxy::getID(proxy_);
auto const han = auto_registry::makeAutoHandlerObjGroupParam<
ObjT, decltype(f), f, SendMsgT
>(ctrl);
return theObjGroup()->broadcast(msg, han);
} else {
auto msg = makeMessage<MsgT>(std::forward<Params>(params)...);
return broadcastMsg<MsgT, f>(msg);
}
}

/vt/src/vt/vrt/collection/send/sendable.impl.h(156)

template <typename ColT, typename IndexT, typename BaseProxyT>
template <auto f, typename... Params>
messaging::PendingSend Sendable<ColT,IndexT,BaseProxyT>::send(Params&&... params) const {
using FnTrait = ObjFuncTraits<decltype(f)>;
using MsgT = typename FnTrait::MsgT;
if constexpr (std::is_same_v<MsgT, NoMsg>) {
using Tuple = typename FnTrait::TupleType;
using SendMsgT = ParamColMsg<Tuple, ColT>;
auto msg = vt::makeMessage<SendMsgT>(std::forward<Params>(params)...);
auto han = auto_registry::makeAutoHandlerCollectionMemParam<
ColT, decltype(f), f, SendMsgT
>();
auto col_proxy = this->getCollectionProxy();
auto elm_proxy = this->getElementProxy();
auto proxy = VrtElmProxy<ColT, IndexT>(col_proxy, elm_proxy);
return theCollection()->sendMsgUntypedHandler<SendMsgT, ColT, IndexT>(
proxy, msg.get(), han
);
} else {
auto msg = makeMessage<MsgT>(std::forward<Params>(params)...);
return sendMsg<MsgT, f>(msg);
}
}

/vt/src/vt/vrt/collection/broadcast/broadcastable.impl.h(200)

template <typename ColT, typename IndexT, typename BaseProxyT>
template <auto f, typename... Params>
messaging::PendingSend
Broadcastable<ColT, IndexT, BaseProxyT>::broadcast(Params&&... params) const {
using MsgT = typename ObjFuncTraits<decltype(f)>::MsgT;
if constexpr (std::is_same_v<MsgT, NoMsg>) {
using Tuple = typename ObjFuncTraits<decltype(f)>::TupleType;
using SendMsgT = ParamColMsg<Tuple, ColT>;
auto msg = vt::makeMessage<SendMsgT>(std::forward<Params>(params)...);
auto han = auto_registry::makeAutoHandlerCollectionMemParam<
ColT, decltype(f), f, SendMsgT
>();
auto proxy = this->getProxy();
return theCollection()->broadcastMsgUntypedHandler<SendMsgT, ColT, IndexT>(
proxy, msg.get(), han, true
);
} else {
auto msg = makeMessage<MsgT>(std::forward<Params>(params)...);
return broadcastMsg<MsgT, f>(msg);
}
}

@cz4rs cz4rs marked this pull request as ready for review March 21, 2023 17:26
@lifflander lifflander force-pushed the 2091-missing-return-statement branch from ba98f55 to f3d2f04 Compare March 21, 2023 18:56
@PhilMiller PhilMiller merged commit 6da9a8c into develop Mar 21, 2023
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.

runLambda needs to explicitly return void
3 participants