Commit 9f034999 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

debugged problem with RNG seed

parent d898aed3
......@@ -58,7 +58,7 @@
"key-sizes" : 32,
"val-sizes" : [ 56, 64 ],
"erase-on-teardown" : true
}
},
{
"type" : "erase",
"repetitions" : 10,
......
......@@ -604,7 +604,7 @@ static void run_client(MPI_Comm comm, Json::Value& config) {
auto& bench = benchmarks[i];
unsigned rep = repetitions[i];
// reset the RNG
srand(seed + rank);
srand(seed + rank*1789);
std::vector<double> local_timings(rep);
for(unsigned j = 0; j < rep; j++) {
MPI_Barrier(comm);
......@@ -647,7 +647,7 @@ static void run_client(MPI_Comm comm, Json::Value& config) {
double q1 = global_timings[n/4];
double q3 = global_timings[(3*n)/4];
std::cout << std::setprecision(9) << std::fixed;
std::cout << "Repetitions : " << n << std::endl;
std::cout << "Samples : " << n << std::endl;
std::cout << "Average(sec) : " << average << std::endl;
std::cout << "Variance(sec^2) : " << variance << std::endl;
std::cout << "StdDev(sec) : " << stddev << std::endl;
......
......@@ -652,6 +652,7 @@ static void sdskv_put_ult(hg_handle_t handle)
hret = margo_get_input(handle, &in);
if(hret != HG_SUCCESS) {
fprintf(stderr, "Error (sdskv_put_ult): margo_get_input failed with error %d\n", hret);
out.ret = SDSKV_ERR_MERCURY;
margo_respond(handle, &out);
margo_destroy(handle);
......@@ -662,6 +663,7 @@ static void sdskv_put_ult(hg_handle_t handle)
auto it = svr_ctx->databases.find(in.db_id);
if(it == svr_ctx->databases.end()) {
ABT_rwlock_unlock(svr_ctx->lock);
fprintf(stderr, "Error (sdskv_put_ult): could not find target database\n");
out.ret = SDSKV_ERR_UNKNOWN_DB;
margo_respond(handle, &out);
margo_free_input(handle, &in);
......@@ -677,6 +679,7 @@ static void sdskv_put_ult(hg_handle_t handle)
if(db->put(kdata, vdata)) {
out.ret = SDSKV_SUCCESS;
} else {
fprintf(stderr, "Error (sdskv_put_ult): put failed\n");
out.ret = SDSKV_ERR_PUT;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment