Skip to content

Commit

Permalink
fix lcit initData: affect lcitb's performance
Browse files Browse the repository at this point in the history
  • Loading branch information
JiakunYan committed Mar 8, 2024
1 parent afec656 commit 5663f0e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions benchmarks/lcitb_pt2pt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ using namespace lcit;

void test(Context ctx)
{
initData(ctx);
int tag = 245 + TRD_RANK_ME;
// int peer_rank = ((1 - LCI_RANK % 2) + LCI_RANK / 2 * 2) %
// LCI_NUM_PROCESSES; // 0 <-> 1, 2 <-> 3
Expand Down Expand Up @@ -74,6 +75,7 @@ void test(Context ctx)
});
}
}
freeData(ctx);
}

int main(int argc, char** args)
Expand Down
4 changes: 2 additions & 2 deletions lci/backend/ofi/server_ofi.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
int err = (x); \
if (err < 0) err = -err; \
if (err) { \
LCI_DBG_Assert(false, "err : %s (%s:%d)\n", fi_strerror(err), __FILE__, \
__LINE__); \
LCI_Assert(false, "err : %s (%s:%d)\n", fi_strerror(err), __FILE__, \
__LINE__); \
} \
} \
while (0) \
Expand Down
2 changes: 0 additions & 2 deletions tests/lcit/lcit.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ Context initCtx(Config config)
LCI_endpoint_init(&ctx.ep, ctx.device, plist);
LCI_plist_free(&plist);

initData(ctx);
if (config.nthreads - config.nprgthreads > 1) {
ctx.threadBarrier = new ThreadBarrier(config.nthreads - config.nprgthreads);
}
Expand All @@ -450,7 +449,6 @@ void freeCtx(Context& ctx)
{
delete ctx.threadBarrier;
ctx.threadBarrier = nullptr;
freeData(ctx);
freeComp(ctx.config.send_comp_type, &ctx.send_comp);
freeComp(ctx.config.recv_comp_type, &ctx.recv_comp);
LCI_endpoint_free(&ctx.ep);
Expand Down
2 changes: 2 additions & 0 deletions tests/lcit/lcit_many2one.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using namespace lcit;

void test(Context ctx)
{
initData(ctx);
int rank = LCI_RANK;
int tag = 245 + TRD_RANK_ME;

Expand Down Expand Up @@ -70,6 +71,7 @@ void test(Context ctx)
}
}
}
freeData(ctx);
}

int main(int argc, char** args)
Expand Down
2 changes: 2 additions & 0 deletions tests/lcit/lcit_pt2pt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using namespace lcit;

void test(Context ctx)
{
initData(ctx);
int rank = LCI_RANK;
int tag = 245 + TRD_RANK_ME;
int peer_rank = ((1 - LCI_RANK % 2) + LCI_RANK / 2 * 2) % LCI_NUM_PROCESSES;
Expand Down Expand Up @@ -63,6 +64,7 @@ void test(Context ctx)
}
}
}
freeData(ctx);
}

int main(int argc, char** args)
Expand Down

0 comments on commit 5663f0e

Please sign in to comment.