Skip to content
Snippets Groups Projects
Commit ab51589e authored by lykos98's avatar lykos98
Browse files

prettified log

parent 5f5bd321
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#else #else
#define TIME_DEF struct timespec __start, __end; #define TIME_DEF struct timespec __start, __end;
#define TIME_START { \ #define TIME_START { \
MPI_Barrier(ctx -> mpi_communicator); \
clock_gettime(CLOCK_MONOTONIC,&__start); \ clock_gettime(CLOCK_MONOTONIC,&__start); \
} }
#define TIME_STOP \ #define TIME_STOP \
...@@ -53,7 +54,7 @@ ...@@ -53,7 +54,7 @@
MPI_Reduce(&time, &avg, 1, MPI_DOUBLE, MPI_SUM, 0, ctx -> mpi_communicator); \ MPI_Reduce(&time, &avg, 1, MPI_DOUBLE, MPI_SUM, 0, ctx -> mpi_communicator); \
MPI_Reduce(&time, &min, 1, MPI_DOUBLE, MPI_MIN, 0, ctx -> mpi_communicator); \ MPI_Reduce(&time, &min, 1, MPI_DOUBLE, MPI_MIN, 0, ctx -> mpi_communicator); \
MPI_Reduce(&time, &max, 1, MPI_DOUBLE, MPI_MAX, 0, ctx -> mpi_communicator); \ MPI_Reduce(&time, &max, 1, MPI_DOUBLE, MPI_MAX, 0, ctx -> mpi_communicator); \
MPI_DB_PRINT("%s -> [avg: %.2lfs, min: %.2lfs, max: %.2lfs]\n", sec_name, avg/((double)ctx -> world_size), min, max); \ MPI_DB_PRINT("%50.50s -> [avg: %.2lfs, min: %.2lfs, max: %.2lfs]\n", sec_name, avg/((double)ctx -> world_size), min, max); \
} \ } \
else \ else \
{ \ { \
......
...@@ -825,7 +825,9 @@ void build_top_kdtree(global_context_t *ctx, pointset_t *og_pointset, top_kdtree ...@@ -825,7 +825,9 @@ void build_top_kdtree(global_context_t *ctx, pointset_t *og_pointset, top_kdtree
/* /*
MPI_DB_PRINT("[MASTER] Top tree builder invoked\n"); MPI_DB_PRINT("[MASTER] Top tree builder invoked\n");
*/ */
MPI_DB_PRINT("Trying to build top tree on %lu with %d processors\n", tot_n_points, ctx->world_size); MPI_DB_PRINT("\n");
MPI_DB_PRINT("Building top tree on %lu points with %d processors\n", tot_n_points, ctx->world_size);
MPI_DB_PRINT("\n");
size_t current_partition_n_points = tot_n_points; size_t current_partition_n_points = tot_n_points;
size_t expected_points_per_node = tot_n_points / ctx->world_size; size_t expected_points_per_node = tot_n_points / ctx->world_size;
...@@ -1321,6 +1323,7 @@ void print_diagnositcs(global_context_t* ctx, int k) ...@@ -1321,6 +1323,7 @@ void print_diagnositcs(global_context_t* ctx, int k)
MPI_INFO_NULL, &shmcomm); MPI_INFO_NULL, &shmcomm);
int shm_world_size; int shm_world_size;
MPI_Comm_size(shmcomm, &shm_world_size); MPI_Comm_size(shmcomm, &shm_world_size);
MPI_DB_PRINT("\n");
MPI_DB_PRINT("[INFO] Got %d ranks per node \n",shm_world_size); MPI_DB_PRINT("[INFO] Got %d ranks per node \n",shm_world_size);
/* data */ /* data */
float_t memory_use = (float_t)ctx -> local_n_points * ctx -> dims * sizeof(float_t); float_t memory_use = (float_t)ctx -> local_n_points * ctx -> dims * sizeof(float_t);
...@@ -1336,6 +1339,7 @@ void print_diagnositcs(global_context_t* ctx, int k) ...@@ -1336,6 +1339,7 @@ void print_diagnositcs(global_context_t* ctx, int k)
if(memory_use > 0.5 * (float_t)info.freeram / 1e9) if(memory_use > 0.5 * (float_t)info.freeram / 1e9)
MPI_DB_PRINT("/!\\ Projected memory usage is more than half of the node memory, may go into troubles while communicating ngbh\n"); MPI_DB_PRINT("/!\\ Projected memory usage is more than half of the node memory, may go into troubles while communicating ngbh\n");
MPI_DB_PRINT("\n");
MPI_Barrier(ctx -> mpi_communicator); MPI_Barrier(ctx -> mpi_communicator);
} }
...@@ -1512,9 +1516,9 @@ void mpi_ngbh_search(global_context_t* ctx, datapoint_info_t* dp_info, top_kdtre ...@@ -1512,9 +1516,9 @@ void mpi_ngbh_search(global_context_t* ctx, datapoint_info_t* dp_info, top_kdtre
} }
/* compute everything */ /* compute everything */
MPI_Barrier(ctx -> mpi_communicator);
elapsed_time = TIME_STOP; elapsed_time = TIME_STOP;
LOG_WRITE("Exchanging points", elapsed_time); LOG_WRITE("Exchanging points", elapsed_time);
MPI_Barrier(ctx -> mpi_communicator);
TIME_START; TIME_START;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment