Skip to content
Snippets Groups Projects
Commit 4c01bd13 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Precalculate the CPU frequency and then use that when synchronizing time,...

Precalculate the CPU frequency and then use that when synchronizing time, helps somewhat but we still have variance between nodes
parent 99a14298
No related branches found
No related tags found
1 merge request!8Draft: RDMA version with wrapped infinity calls
......@@ -769,9 +769,10 @@ int main(int argc, char *argv[]) {
if (myrank == 0) message("All RDMA servers are started");
/* Reset time as previous can be thought of as setup costs? */
MPI_Barrier(MPI_COMM_WORLD); // Vital...
long long freq = clocks_get_cpufreq();
MPI_Barrier(MPI_COMM_WORLD); // Vital... but not accurate XXX
if (myrank == 0) message("All synchronized, restarting time.");
clocks_set_cpufreq(0);
clocks_set_cpufreq(freq);
/* Now we have a thread per rank to send the messages. */
pthread_t sendthread[nr_ranks];
......
......@@ -541,8 +541,10 @@ int main(int argc, char *argv[]) {
for (int k = 0; k < nr_ranks; k++) starting[k] = 1;
/* Time to start time. Try to make it synchronous across the ranks. */
MPI_Barrier(MPI_COMM_WORLD);
clocks_set_cpufreq(0);
long long freq = clocks_get_cpufreq();
MPI_Barrier(MPI_COMM_WORLD);
clocks_set_cpufreq(freq);
if (myrank == 0) {
message("Start of MPI tests");
message("==================");
......@@ -578,8 +580,8 @@ int main(int argc, char *argv[]) {
/* Reset time as previous can be thought of as setup costs? */
MPI_Barrier(MPI_COMM_WORLD); // Vital...
clocks_set_cpufreq(freq);
message("All synchronized");
clocks_set_cpufreq(0);
/* Now we have a thread per rank to send the messages. */
pthread_t sendthread[nr_ranks];
......
......@@ -490,8 +490,10 @@ int main(int argc, char *argv[]) {
pick_logs();
/* Time to start time. Try to make it synchronous across the ranks. */
MPI_Barrier(MPI_COMM_WORLD);
clocks_set_cpufreq(0);
long long freq = clocks_get_cpufreq();
MPI_Barrier(MPI_COMM_WORLD);
clocks_set_cpufreq(freq);
if (myrank == 0) {
message("Start of MPI tests");
message("==================");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment