Skip to content

Commit

Permalink
Remove debugging code from borg_bench.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHogan committed May 17, 2022
1 parent 845b6dd commit dff339e
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions benchmarks/borg_bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ int main(int argc, char *argv[]) {
}

bool use_borg = true;

if (argc == 2) {
use_borg = false;
}

HermesPtr hermes = hapi::InitHermes(getenv("HERMES_CONF"));

if (hermes->IsApplicationCore()) {
Expand All @@ -66,7 +71,9 @@ int main(int argc, char *argv[]) {
hapi::Bucket bkt(bkt_name, hermes);

hapi::WriteOnlyTrait trait;
vbkt.Attach(&trait);
if (use_borg) {
vbkt.Attach(&trait);
}

const size_t kBlobSize = KILOBYTES(4);
hapi::Blob blob(kBlobSize);
Expand Down Expand Up @@ -97,17 +104,17 @@ int main(int argc, char *argv[]) {
std::cout << "Rank " << rank << " failed puts: " << failed_puts << "\n";
std::cout << " " << "failed links: " << failed_links << "\n";

// hermes->AppBarrier();
// if (!hermes->IsFirstRankOnNode()) {
// vbkt.Release();
// bkt.Release();
// }
hermes->AppBarrier();
if (!hermes->IsFirstRankOnNode()) {
vbkt.Release();
bkt.Release();
}

hermes->AppBarrier();
// if (hermes->IsFirstRankOnNode()) {
if (hermes->IsFirstRankOnNode()) {
vbkt.Destroy();
bkt.Destroy();
// }
}

hermes->AppBarrier();

Expand Down

0 comments on commit dff339e

Please sign in to comment.