fix failed merge

This commit is contained in:
JamesEMcclure
2020-03-17 21:44:45 -04:00
parent 9f5b44dfe4
commit 05cafcb525
125 changed files with 2544 additions and 8538 deletions

View File

@@ -9,7 +9,7 @@
#include "common/Communication.h"
#include "analysis/TwoPhase.h"
#include "analysis/runAnalysis.h"
#include "common/MPI.h"
#include "common/MPI_Helpers.h"
#include "ProfilerApp.h"
#include "threadpool/thread_pool.h"
@@ -30,9 +30,10 @@ int main(int argc, char **argv)
// Initialize MPI
int provided_thread_support = -1;
MPI_Init_thread(&argc,&argv,MPI_THREAD_MULTIPLE,&provided_thread_support);
Utilities::MPI comm( MPI_COMM_WORLD );
int rank = comm.getRank();
int nprocs = comm.getSize();
MPI_Comm comm;
MPI_Comm_dup(MPI_COMM_WORLD,&comm);
int rank = comm_rank(comm);
int nprocs = comm_size(comm);
{ // Limit scope so variables that contain communicators will free before MPI_Finialize
// parallel domain size (# of sub-domains)
@@ -51,7 +52,7 @@ int main(int argc, char **argv)
// int device=ScaLBL_SetDevice(rank);
//printf("Using GPU ID %i for rank %i \n",device,rank);
ScaLBL_DeviceBarrier();
comm.barrier();
MPI_Barrier(comm);
PROFILE_ENABLE(1);
//PROFILE_ENABLE_TRACE();
@@ -170,7 +171,7 @@ int main(int argc, char **argv)
}
// **************************************************************
// Broadcast simulation parameters from rank 0 to all other procs
comm.barrier();
MPI_Barrier(comm);
//.................................................
MPI_Bcast(&tauA,1,MPI_DOUBLE,0,comm);
MPI_Bcast(&tauB,1,MPI_DOUBLE,0,comm);
@@ -206,7 +207,7 @@ int main(int argc, char **argv)
// Get the rank info
const RankInfoStruct rank_info(rank,nprocx,nprocy,nprocz);
comm.barrier();
MPI_Barrier(comm);
if (nprocs != nprocx*nprocy*nprocz){
printf("nprocx = %i \n",nprocx);
@@ -261,7 +262,7 @@ int main(int argc, char **argv)
// Mask that excludes the solid phase
Domain Mask(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BoundaryCondition);
comm.barrier();
MPI_Barrier(comm);
Nx+=2; Ny+=2; Nz += 2;
int N = Nx*Ny*Nz;
@@ -296,7 +297,7 @@ int main(int argc, char **argv)
sprintf(LocalRankString,"%05d",rank);
sprintf(LocalRankFilename,"%s%s","SignDist.",LocalRankString);
ReadBinaryFile(LocalRankFilename, Averages->SDs.data(), N);
comm.barrier();
MPI_Barrier(comm);
if (rank == 0) cout << "Domain set." << endl;
if (rank==0) printf("Initialize from segmented data: solid=0, NWP=1, WP=2 \n");
@@ -340,7 +341,7 @@ int main(int argc, char **argv)
delete [] cDen;
delete [] cfq;
*/
comm.barrier();
MPI_Barrier(comm);
}
fflush(stdout);
@@ -415,7 +416,7 @@ int main(int argc, char **argv)
neighborList= new int[18*Npad];
Np = ScaLBL_Comm.MemoryOptimizedLayoutAA(Map,neighborList,Mask.id,Np);
if (rank==0) printf ("Set up memory efficient layout Npad=%i, Np=%i \n",Npad,Np);
comm.barrier();
MPI_Barrier(comm);
//...........................................................................
// MAIN VARIABLES ALLOCATED HERE
//...........................................................................
@@ -536,7 +537,7 @@ int main(int argc, char **argv)
//.......create and start timer............
double starttime,stoptime,cputime;
ScaLBL_DeviceBarrier();
comm.barrier();
MPI_Barrier(comm);
starttime = MPI_Wtime();
//.........................................
@@ -588,7 +589,7 @@ int main(int argc, char **argv)
}
ScaLBL_D3Q19_AAodd_Color(NeighborList, dvcMap, fq, Aq, Bq, Den, Phi, Velocity, rhoA, rhoB, tauA, tauB,
alpha, beta, Fx, Fy, Fz, Nx, Nx*Ny, 0, ScaLBL_Comm.next, Np);
ScaLBL_DeviceBarrier(); comm.barrier();
ScaLBL_DeviceBarrier(); MPI_Barrier(comm);
// *************EVEN TIMESTEP*************
timestep++;
@@ -621,10 +622,10 @@ int main(int argc, char **argv)
}
ScaLBL_D3Q19_AAeven_Color(dvcMap, fq, Aq, Bq, Den, Phi, Velocity, rhoA, rhoB, tauA, tauB,
alpha, beta, Fx, Fy, Fz, Nx, Nx*Ny, 0, ScaLBL_Comm.next, Np);
ScaLBL_DeviceBarrier(); comm.barrier();
ScaLBL_DeviceBarrier(); MPI_Barrier(comm);
//************************************************************************
comm.barrier();
MPI_Barrier(comm);
PROFILE_STOP("Update");
// Run the analysis
@@ -636,7 +637,7 @@ int main(int argc, char **argv)
PROFILE_SAVE("lbpm_color_simulator",1);
//************************************************************************
ScaLBL_DeviceBarrier();
comm.barrier();
MPI_Barrier(comm);
stoptime = MPI_Wtime();
if (rank==0) printf("-------------------------------------------------------------------\n");
// Compute the walltime per timestep
@@ -656,8 +657,9 @@ int main(int argc, char **argv)
PROFILE_STOP("Main");
PROFILE_SAVE("lbpm_color_simulator",1);
// ****************************************************
comm.barrier();
MPI_Barrier(comm);
} // Limit scope so variables that contain communicators will free before MPI_Finialize
MPI_Comm_free(&comm);
MPI_Finalize();
}