// printf("Im inside the 1st if of reduction after source and target assignment for loop inside shmem_reduce_binomial my rank %d target rank %d\n", global_rank, target_rank);
#if defined(DEBUG)
intmy_start=(I_m_target?0:dsize2);
#endif
...
...
@@ -398,7 +542,7 @@ int shmem_reduce( int sector, int target_rank, int dsize, map_t *Me, double * re
// are ready to be used (control tag must have // the value of the current sector )
// printf("Im inside the 1st if of reduction after aquire ctrl for loop inside shmem_reduce_binomial my rank %d target rank %d\n", global_rank, target_rank);
// performs the summation loop
//
double*my_end=my_source+dsize2;
...
...
@@ -414,23 +558,31 @@ int shmem_reduce( int sector, int target_rank, int dsize, map_t *Me, double * re
summations+=(!sector)*dsize2;
if(dsize2<16)
{
// printf("Im inside the if dsize2<16 of reduction after aquire ctrl for loop inside shmem_reduce_binomial my rank %d target rank %d\n", global_rank, target_rank);
for(;my_source<my_end;my_source++,my_target++)
*my_target+=*my_source;
// printf("Im inside the if dsize2<16 of reduction after for loop inside shmem_reduce_binomial my rank %d target rank %d\n", global_rank, target_rank);
}
else
{
// printf("Im inside the else dsize2<16 of reduction after aquire ctrl for loop inside shmem_reduce_binomial my rank %d target rank %d\n", global_rank, target_rank);
double*my_end_4=my_source+dsize2_4;
// printf("Im inside the else dsize2<16 of reduction after my_end_4 for loop inside shmem_reduce_binomial my rank %d target rank %d\n", global_rank, target_rank);
// printf("I'm inside the beginning of the for loop for adding source my source %lf rank %d target rank %d\n",*my_source, global_rank, target_rank);
*my_target+=*my_source;
*(my_target+1)+=*(my_source+1);
*(my_target+2)+=*(my_source+2);
*(my_target+3)+=*(my_source+3);
// printf("I'm inside the for loop for adding source my source %lf rank %d target rank %d\n",*my_source, global_rank, target_rank);
}
// printf("Im inside the else dsize2<16 of reduction after 1st for loop inside shmem_reduce_binomial my rank %d target rank %d\n", global_rank, target_rank);
for(;my_source<my_end;my_source++,my_target++)
*my_target+=*my_source;
// printf("Im inside the else dsize2<16 of reduction after 2st for loop inside shmem_reduce_binomial my rank %d target rank %d\n", global_rank, target_rank);
}
//printf("Im inside the 1st if of reduction after summation for loop inside shmem_reduce_binomial my rank %d target rank %d\n", global_rank, target_rank);
timing.tsum+=CPU_TIME_tr-tstart;
#if defined(USE_PAPI)
if(sector==0)
...
...
@@ -450,7 +602,7 @@ int shmem_reduce( int sector, int target_rank, int dsize, map_t *Me, double * re
dprintf(1,0,0,"- SEC %d l %d t %d <-> %d done : %d\n",