Commit ab51589e authored by lykos98's avatar lykos98
Browse files

prettified log

parent 5f5bd321
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@
#else 
    #define TIME_DEF struct timespec __start, __end;
    #define TIME_START { \
        MPI_Barrier(ctx -> mpi_communicator); \
        clock_gettime(CLOCK_MONOTONIC,&__start); \
    }
    #define TIME_STOP \
@@ -53,7 +54,7 @@
            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, &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 \
        { \
+6 −2
Original line number Diff line number Diff line
@@ -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("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 expected_points_per_node = tot_n_points / ctx->world_size;
@@ -1321,6 +1323,7 @@ void print_diagnositcs(global_context_t* ctx, int k)
                        MPI_INFO_NULL, &shmcomm);
    int 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); 
    /* data */
    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)
    
    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("\n");

    MPI_Barrier(ctx -> mpi_communicator);
}
@@ -1512,9 +1516,9 @@ void mpi_ngbh_search(global_context_t* ctx, datapoint_info_t* dp_info, top_kdtre
    }

    /* compute everything */
    MPI_Barrier(ctx -> mpi_communicator);
    elapsed_time = TIME_STOP;
    LOG_WRITE("Exchanging points", elapsed_time);
    MPI_Barrier(ctx -> mpi_communicator);


    TIME_START;