Setting based on MPI rank

This commit is contained in:
James E McClure
2018-04-14 21:01:16 -04:00
parent 4e7c8fda99
commit 9b618db185
3 changed files with 8 additions and 7 deletions

View File

@@ -27,9 +27,6 @@ using namespace std;
int main(int argc, char **argv)
{
// Initialize compute device
int device=ScaLBL_SetDevice();
// Initialize MPI
int provided_thread_support = -1;
MPI_Init_thread(&argc,&argv,MPI_THREAD_MULTIPLE,&provided_thread_support);
@@ -39,6 +36,9 @@ int main(int argc, char **argv)
int nprocs = comm_size(comm);
{ // Limit scope so variables that contain communicators will free before MPI_Finialize
// Initialize compute device
int device=ScaLBL_SetDevice(rank);
// parallel domain size (# of sub-domains)
int nprocx,nprocy,nprocz;
int iproc,jproc,kproc;