From 2586d72336bc2916d0a3d0d3256a092c246f9ca3 Mon Sep 17 00:00:00 2001 From: James E McClure Date: Fri, 16 Mar 2018 12:23:12 -0400 Subject: [PATCH] Fixing perf measures in TestCommD3Q19 --- tests/TestCommD3Q19.cpp | 6 +++--- tests/lbpm_color_macro_simulator.cpp | 12 +----------- tests/lbpm_permeability_simulator.cpp | 2 +- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/tests/TestCommD3Q19.cpp b/tests/TestCommD3Q19.cpp index 9934cd8d..5d7dcaf6 100644 --- a/tests/TestCommD3Q19.cpp +++ b/tests/TestCommD3Q19.cpp @@ -481,7 +481,7 @@ int main(int argc, char **argv) // cout << "CPU time: " << (stoptime - starttime) << " seconds" << endl; cputime = stoptime - starttime; // cout << "Lattice update rate: "<< double(Nx*Ny*Nz*timestep)/cputime/1000000 << " MLUPS" << endl; - double MLUPS = double(Nx*Ny*Nz*timestep)/cputime/1000000; + double MLUPS = double(Np)*double(timestep)/cputime*1e-6; if (rank==0) printf("********************************************************\n"); if (rank==0) printf("CPU time = %f \n", cputime); if (rank==0) printf("Lattice update rate (per process)= %f MLUPS \n", MLUPS); @@ -491,9 +491,9 @@ int main(int argc, char **argv) // Number of memory references from the swap algorithm (per timestep) // 18 reads and 18 writes for each lattice site - double MemoryRefs = (Nx-2)*(Ny-2)*(Nz-2)*36; + double MemoryRefs = double(Np)*36; // number of memory references for the swap algorithm - GigaBytes / second - if (rank==0) printf("DRAM bandwidth (per process)= %f GB/sec \n",MemoryRefs*8*timestep/1e9); + if (rank==0) printf("DRAM bandwidth (per process)= %f GB/sec \n",MemoryRefs*8*double(timestep)*1e-9); // Report bandwidth in Gigabits per second // communication bandwidth includes both send and recieve if (rank==0) printf("Communication bandwidth (per process)= %f Gbit/sec \n",ScaLBL_Comm.CommunicationCount*64*timestep/1e9); diff --git a/tests/lbpm_color_macro_simulator.cpp b/tests/lbpm_color_macro_simulator.cpp index dc388287..6107bab2 100644 --- a/tests/lbpm_color_macro_simulator.cpp +++ b/tests/lbpm_color_macro_simulator.cpp @@ -645,7 +645,7 @@ int main(int argc, char **argv) // Compute the walltime per timestep cputime = (stoptime - starttime)/timestep; // Performance obtained from each node - double MLUPS = double(Nx*Ny*Nz)/cputime/1000000; + double MLUPS = double(Np)/cputime/1000000; if (rank==0) printf("********************************************************\n"); if (rank==0) printf("CPU time = %f \n", cputime); @@ -655,16 +655,6 @@ int main(int argc, char **argv) if (rank==0) printf("********************************************************\n"); // ************************************************************************ - double *PHASE; - int SIZE=Nx*Ny*Nz*sizeof(double); - PHASE= new double [Nx*Ny*Nz]; - ScaLBL_CopyToHost(&PHASE[0],&Phi[0],SIZE); - - FILE *OUTFILE; - sprintf(LocalRankFilename,"Phase.%05i.raw",rank); - OUTFILE = fopen(LocalRankFilename,"wb"); - fwrite(PHASE,8,N,OUTFILE); - fclose(OUTFILE); PROFILE_STOP("Main"); PROFILE_SAVE("lbpm_color_simulator",1); diff --git a/tests/lbpm_permeability_simulator.cpp b/tests/lbpm_permeability_simulator.cpp index 723b1e4e..4238bb84 100644 --- a/tests/lbpm_permeability_simulator.cpp +++ b/tests/lbpm_permeability_simulator.cpp @@ -424,7 +424,7 @@ int main(int argc, char **argv) // Compute the walltime per timestep cputime = (stoptime - starttime)/timestep; // Performance obtained from each node - double MLUPS = double(Nx*Ny*Nz)/cputime/1000000; + double MLUPS = double(Np)/cputime/1000000; if (rank==0) printf("********************************************************\n"); if (rank==0) printf("CPU time = %f \n", cputime);