demo for performance in MRT model

This commit is contained in:
James McClure
2021-01-20 18:25:29 -05:00
parent e63b471260
commit c350e2b45e
2 changed files with 6 additions and 2 deletions

View File

@@ -319,6 +319,7 @@ double ScaLBL_Communicator::GetPerformance(int *NeighborList, double *fq, int Np
double FX = 0.0;
double FY = 0.0;
double FZ = 0.0;
ScaLBL_D3Q19_Init(fq, Np);
//.......create and start timer............
double starttime,stoptime,cputime;
Barrier();
@@ -333,7 +334,7 @@ double ScaLBL_Communicator::GetPerformance(int *NeighborList, double *fq, int Np
stoptime = MPI_Wtime();
Barrier();
// Compute the walltime per timestep
cputime = (stoptime - starttime)/TIMESTEPS;
cputime = 0.5*(stoptime - starttime)/TIMESTEPS;
// Performance obtained from each node
double MLUPS = double(Np)/cputime/1000000;
return MLUPS;

View File

@@ -26,6 +26,8 @@ void ScaLBL_MRTModel::ReadParams(string filename){
tolerance = 1.0e-8;
Fx = Fy = 0.0;
Fz = 1.0e-5;
dout = 1.0;
din = 1.0;
// Color Model parameters
if (mrt_db->keyExists( "timestepMax" )){
@@ -194,7 +196,8 @@ void ScaLBL_MRTModel::Create(){
// copy the neighbor list
ScaLBL_CopyToDevice(NeighborList, neighborList, neighborSize);
comm.barrier();
double MLUPS = ScaLBL_Comm->GetPerformance(NeighborList,fq,Np);
printf(" MLPUS=%f from rank %i\n",MLUPS,rank);
}
void ScaLBL_MRTModel::Initialize(){