Minor Changes
Time Calculation changed to based on 1e11 with 100%CD
This commit is contained in:
@@ -39,7 +39,6 @@ void Simulation::init_pop_arrays() { // Init C-arrays used for MPI-Allgather com
|
||||
pop_species = new species[number_pop_species];
|
||||
pop_array_lengths = new int[number_pop_species];
|
||||
global_cum_time_s = new double *[number_pop_species];
|
||||
global_offset = new double *[number_pop_species];
|
||||
|
||||
Population_Base *population;
|
||||
|
||||
@@ -51,10 +50,8 @@ void Simulation::init_pop_arrays() { // Init C-arrays used for MPI-Allgather com
|
||||
|
||||
pop_array_lengths[i] = population->access_container()->data_size;
|
||||
global_cum_time_s[i] = new double[pop_array_lengths[i]];
|
||||
global_offset[i] = new double[pop_array_lengths[i]];
|
||||
for (int j = 0; j<pop_array_lengths[i]; j++) {
|
||||
global_cum_time_s[i][j] = 0;
|
||||
global_offset[i][j] = 0;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -132,10 +129,8 @@ void Simulation::deconstruct_pop_arrays() { // Deallocate memory properly
|
||||
delete[] pop_array_lengths;
|
||||
for (int i = 0; i<number_pop_species; i++) {
|
||||
delete[] global_cum_time_s[i];
|
||||
delete[] global_offset[i];
|
||||
}
|
||||
delete[] global_cum_time_s;
|
||||
delete[] global_offset;
|
||||
}
|
||||
|
||||
|
||||
@@ -145,6 +140,7 @@ void Simulation::doit() { // 2 Phase: 1. calc average densities, 2. actual simul
|
||||
cout<<"Population calculation done.\n";
|
||||
}
|
||||
do_cycle(numberTotalDecays, simulationStepWidth, true);
|
||||
looper.flush();
|
||||
print_term_stats();
|
||||
};
|
||||
|
||||
@@ -187,7 +183,6 @@ void Simulation::do_decays(const long int &number_decays, const bool &logging) {
|
||||
number_local_decays += number_decays;
|
||||
sync_cpus();
|
||||
do_statusUpdate();
|
||||
|
||||
}
|
||||
|
||||
void Simulation::sync_cpus() { // Sync populations among MPI World
|
||||
@@ -217,7 +212,7 @@ void Simulation::sync_populations() { // Sync new densities for each species and
|
||||
|
||||
MPI_Allreduce(local_delta_cumulated_time_s, global_delta_cumulated_time_s, array_length, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
|
||||
|
||||
for (int j = 0; j<pop_array_lengths[i]; j++) {
|
||||
for (int j = 0; j<array_length; j++) {
|
||||
global_cum_time_s[i][j] += global_delta_cumulated_time_s[j];
|
||||
container->cum_times_s[j] = global_cum_time_s[i][j];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user