Updated lbpm_square_tube to ensure clean MPI exit

This commit is contained in:
James E McClure
2016-09-02 14:58:23 -04:00
parent 6a492e48d3
commit 5e89555e7f

View File

@@ -22,6 +22,7 @@ int main(int argc, char **argv)
MPI_Comm comm = MPI_COMM_WORLD; MPI_Comm comm = MPI_COMM_WORLD;
MPI_Comm_rank(comm,&rank); MPI_Comm_rank(comm,&rank);
MPI_Comm_size(comm,&nprocs); MPI_Comm_size(comm,&nprocs);
{
// parallel domain size (# of sub-domains) // parallel domain size (# of sub-domains)
int nprocx,nprocy,nprocz; int nprocx,nprocy,nprocz;
int iproc,jproc,kproc; int iproc,jproc,kproc;
@@ -207,7 +208,8 @@ int main(int argc, char **argv)
fwrite(id,1,N,ID); fwrite(id,1,N,ID);
fclose(ID); fclose(ID);
// **************************************************** }
// ****************************************************
MPI_Barrier(comm); MPI_Barrier(comm);
MPI_Finalize(); MPI_Finalize();
// **************************************************** // ****************************************************