Skip to content

Commit

Permalink
#2302: Fix warnings and print
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrepebay committed Jul 29, 2024
1 parent c8d79d7 commit 5c993b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/collection/do_flops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ do_flops( int n )
double pi(uint64_t n) {
double sum = 0.0;
int sign = 1;
for (int i = 0; i < n; ++i) {
for (uint64_t i = 0; i < n; ++i) {
sum += sign/(2.0*i+1.0);
sign *= -1;
}
Expand Down Expand Up @@ -132,7 +132,7 @@ struct GenericWork : vt::Collection<GenericWork, vt::Index1D> {
{ }
};

void checkCompleteCB(double normRes) {
void checkCompleteCB() {
auto const iter_max_reached = iter_ > maxIter_;

if (iter_max_reached) {
Expand Down Expand Up @@ -160,7 +160,7 @@ struct GenericWork : vt::Collection<GenericWork, vt::Index1D> {

auto proxy = this->getCollectionProxy();
proxy.reduce<&GenericWork::checkCompleteCB, vt::collective::MaxOp>(
proxy[0], 0.0
proxy[0]
);

vt::theContext()->getTask()->stopPAPIMetrics();
Expand Down
2 changes: 1 addition & 1 deletion src/vt/context/runnable_context/papi_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct PAPIData {

// check if the environment variable is set
if (env_p == nullptr) {
std::cout << "Warning: Environment variabale VT_EVENTS not set, defaulting to instructions for the PAPI event set." << std::endl;
fmt::print("Warning: Environment variabale VT_EVENTS not set, defaulting to instructions for the PAPI event set.\n");
native_events.push_back("instructions");
}
else {
Expand Down

0 comments on commit 5c993b5

Please sign in to comment.