Fixed bug, regarding wrong datatype for timeing and only letting rank0 time.
This commit is contained in:
@@ -191,10 +191,13 @@ void Simulation::sync_cpus() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Simulation::sync_populations() {
|
void Simulation::sync_populations() {
|
||||||
|
double time1, time2;
|
||||||
uint64_t t1, t2;
|
uint64_t t1, t2;
|
||||||
int time1, time2;
|
if (mpi_rank == 0) {
|
||||||
time1 = MPI_Wtime();
|
|
||||||
__asm volatile ("rdtsc" : "=A"(t1));
|
__asm volatile ("rdtsc" : "=A"(t1));
|
||||||
|
time1 = MPI_Wtime();
|
||||||
|
}
|
||||||
|
|
||||||
Population_Manager *populations = looper.get_populations();
|
Population_Manager *populations = looper.get_populations();
|
||||||
Population_Container *container;
|
Population_Container *container;
|
||||||
double *global_delta_cumulated_time_s;
|
double *global_delta_cumulated_time_s;
|
||||||
@@ -232,10 +235,13 @@ void Simulation::sync_populations() {
|
|||||||
delete[] local_delta_cumulated_time_s;
|
delete[] local_delta_cumulated_time_s;
|
||||||
delete[] local_delta_offset;
|
delete[] local_delta_offset;
|
||||||
}
|
}
|
||||||
|
if (mpi_rank == 0) {
|
||||||
__asm volatile ("rdtsc" : "=A"(t2));
|
__asm volatile ("rdtsc" : "=A"(t2));
|
||||||
time2=MPI_Wtime();
|
time2=MPI_Wtime();
|
||||||
cout<<"number of cycles: \t"<<(t2-t1)<<"\n";
|
cout<<"number of cycles: \t"<<(t2-t1)<<"\n";
|
||||||
cout<<"time: \t"<<(time2-time1)<<"\n";
|
cout<<"time: \t"<<(time2-time1)<<"\n";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Simulation::do_statusUpdate() {
|
void Simulation::do_statusUpdate() {
|
||||||
|
|||||||
Reference in New Issue
Block a user