From 711cc4d350b1ed8c19286269a187e9fb9ead4073 Mon Sep 17 00:00:00 2001 From: Miikka Vaisala Date: Tue, 29 Sep 2020 16:36:43 +0800 Subject: [PATCH] Moving code in wrong place. --- src/core/device.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/device.cc b/src/core/device.cc index cf20e85..d931925 100644 --- a/src/core/device.cc +++ b/src/core/device.cc @@ -1439,11 +1439,17 @@ AcResult acGridGeneralBoundconds(const Device device, const Stream stream) { // Non-periodic Boundary conditions + // Check the position in MPI frame + int nprocs, pid; + MPI_Comm_size(MPI_COMM_WORLD, &nprocs); + MPI_Comm_rank(MPI_COMM_WORLD, &pid); + const uint3_64 decomposition = decompose(nprocs); + const int3 pid3d = getPid3D(pid, decomposition); // Set outer boudaries after substep computation. const int3 m1 = (int3){0, 0, 0}; const int3 m2 = grid.nn; - const int3 pid3d = getPid3D(pid, grid.decomposition); + const int3 pid3d = getPid3D(pid, decomposition); // If we are are a boundary element int3 bindex = (int3){0, 0, 0}; @@ -1708,12 +1714,6 @@ acGridIntegrate(const Stream stream, const AcReal dt) acGridLoadScalarUniform(stream, AC_dt, dt); acDeviceSynchronizeStream(device, stream); - // Check the position in MPI frame - int nprocs, pid; - MPI_Comm_size(MPI_COMM_WORLD, &nprocs); - MPI_Comm_rank(MPI_COMM_WORLD, &pid); - const uint3_64 decomposition = decompose(nprocs); - const int3 pid3d = getPid3D(pid, decomposition); // Corners #if MPI_INCL_CORNERS