Skip to content

Commit

Permalink
Merge pull request #2000 from DARMA-tasking/1999-fix-warnings
Browse files Browse the repository at this point in the history
#1999 Fix icpc/nvcc warnings seen in CDash
  • Loading branch information
PhilMiller authored Oct 18, 2022
2 parents 8315da3 + 08e3950 commit e6b6724
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
12 changes: 4 additions & 8 deletions tests/unit/collection/test_collection_group.extended.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
namespace vt { namespace tests { namespace unit {

static int32_t elem_counter = 0;
static bool handler_executed = false;

struct MyReduceMsg : collective::ReduceTMsg<int> {
explicit MyReduceMsg(int const in_num)
Expand Down Expand Up @@ -87,7 +86,6 @@ struct ColA : Collection<ColA,Index1D> {
void memberHandler(TestDataMsg* msg) {
EXPECT_EQ(msg->value_, theContext()->getNode());
--elem_counter;
handler_executed = true;
}

virtual ~ColA() {
Expand All @@ -101,15 +99,13 @@ struct ColA : Collection<ColA,Index1D> {
bool reduce_test = false;
};

void colHanlder(
void colHandler(
ColA::TestDataMsg* msg, typename ColA::TestDataMsg::CollectionType* type) {
--elem_counter;
handler_executed = true;
}

template <typename f>
void runBcastTestHelper(f&& func) {
handler_executed = false;
runInEpochCollective([=]{
func();
});
Expand Down Expand Up @@ -186,22 +182,22 @@ TEST_F(TestCollectionGroup, test_collection_group_3) {
// raw msg pointer case
runBcastTestHelper([proxy, my_node]{
auto msg = ::vt::makeMessage<ColA::TestDataMsg>(my_node);
proxy.broadcastCollectiveMsg<ColA::TestDataMsg, colHanlder>(msg.get());
proxy.broadcastCollectiveMsg<ColA::TestDataMsg, colHandler>(msg.get());
});

EXPECT_EQ(elem_counter, 0);

// smart msg pointer case
runBcastTestHelper([proxy, my_node]{
auto msg = ::vt::makeMessage<ColA::TestDataMsg>(my_node);
proxy.broadcastCollectiveMsg<ColA::TestDataMsg, colHanlder>(msg);
proxy.broadcastCollectiveMsg<ColA::TestDataMsg, colHandler>(msg);
});

EXPECT_EQ(elem_counter, -numElems);

// msg constructed on the fly case
runBcastTestHelper([proxy, my_node]{
proxy.broadcastCollective<ColA::TestDataMsg, colHanlder, ColA::TestDataMsg>(
proxy.broadcastCollective<ColA::TestDataMsg, colHandler, ColA::TestDataMsg>(
my_node
);
});
Expand Down
10 changes: 3 additions & 7 deletions tests/unit/lb/test_lb_data_comm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,10 @@ struct ReduceMsg : SerializeRequired<
)
{ }

#if defined(__INTEL_COMPILER)
#pragma warning(push)
#pragma warning(disable : 177)
#endif
template <typename SerializerT>
void serialize(SerializerT& s) {
MessageParentType::serialize(s);
}
#if defined(__INTEL_COMPILER)
#pragma warning(pop)
#endif
};
struct ColProxyMsg : vt::Message {
using ProxyType = vt::CollectionProxy<MyCol>;
Expand Down Expand Up @@ -762,6 +755,9 @@ TEST_F(TestLBDataComm, test_lb_data_comm_handler_to_handler_send) {
}
}
EXPECT_TRUE(found);

// Suppress warnings about that method being "declared but never referenced" from Intel icpc and Nvidia nvcc
(void)&ReduceMsg::serialize<checkpoint::Serializer>;
}

} /* end anon namespace */
Expand Down

0 comments on commit e6b6724

Please sign in to comment.