From 5531f892c333179f657503319c639f48a84d9efe Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 11 Nov 2020 12:47:13 +0100 Subject: [PATCH] z = 0 for invalid number of processes e.g. using 24 processes for a 128x128x128 grid would need 21 processes with z=6 and 1 process with z=2 --- src/grid/discretization_grid.f90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/grid/discretization_grid.f90 b/src/grid/discretization_grid.f90 index 84223e0c8..8039b4267 100644 --- a/src/grid/discretization_grid.f90 +++ b/src/grid/discretization_grid.f90 @@ -84,6 +84,8 @@ subroutine discretization_grid_init(restart) PETSC_COMM_WORLD, & z, & ! domain grid size along z z_offset) ! domain grid offset along z + if(z==0_C_INTPTR_T) call IO_error(894, ext_msg='invalid number of threads') + grid3 = int(z) grid3Offset = int(z_offset) size3 = geomSize(3)*real(grid3,pReal) /real(grid(3),pReal)