Commit cff5fc10 authored by iker_martin's avatar iker_martin
Browse files

Minor fix for capped times in communications

parent 0982cac5
...@@ -74,9 +74,10 @@ double init_stage(configuration *config_file, int stage_i, group_data group, MPI ...@@ -74,9 +74,10 @@ double init_stage(configuration *config_file, int stage_i, group_data group, MPI
* realizara la operacion. * realizara la operacion.
*/ */
double process_stage(configuration config_file, iter_stage_t stage, group_data group, MPI_Comm comm) { double process_stage(configuration config_file, iter_stage_t stage, group_data group, MPI_Comm comm) {
int i; int i=0;
double result, t_start, t_total; double result, t_start, t_total;
t_start = t_total = MPI_Wtime(); t_start = MPI_Wtime();
t_total = 0;
switch(stage.pt) { switch(stage.pt) {
//Computo //Computo
...@@ -110,7 +111,7 @@ double process_stage(configuration config_file, iter_stage_t stage, group_data g ...@@ -110,7 +111,7 @@ double process_stage(configuration config_file, iter_stage_t stage, group_data g
break; break;
case COMP_ALLGATHER: case COMP_ALLGATHER:
if(stage.t_capped) { if(stage.t_capped) {
while(t_total < stage.t_stage) { while(t_total < stage.t_stage) {
MPI_Allgatherv(stage.array, stage.my_bytes, MPI_CHAR, stage.full_array, stage.counts.counts, stage.counts.displs, MPI_CHAR, comm); MPI_Allgatherv(stage.array, stage.my_bytes, MPI_CHAR, stage.full_array, stage.counts.counts, stage.counts.displs, MPI_CHAR, comm);
t_total = MPI_Wtime() - t_start; t_total = MPI_Wtime() - t_start;
MPI_Bcast(&t_total, 1, MPI_DOUBLE, ROOT, comm); MPI_Bcast(&t_total, 1, MPI_DOUBLE, ROOT, comm);
......
Supports Markdown
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