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
This commit is contained in:
Martin Diehl 2020-11-11 12:47:13 +01:00
parent 429c226008
commit 5531f892c3
1 changed files with 2 additions and 0 deletions

View File

@ -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)