needs broadcast, otherwise rank>0 fail

This commit is contained in:
Martin Diehl 2021-04-11 09:58:40 +02:00
parent 547f2ffa69
commit b67e837548
1 changed files with 1 additions and 1 deletions

View File

@ -74,10 +74,10 @@ subroutine discretization_grid_init(restart)
allocate(materialAt_global(0)) ! needed for IntelMPI
endif
if (grid(1) < 2) call IO_error(844, ext_msg='cells(1) must be larger than 1')
call MPI_Bcast(grid,3,MPI_INTEGER,0,PETSC_COMM_WORLD, ierr)
if (ierr /= 0) error stop 'MPI error'
if (grid(1) < 2) call IO_error(844, ext_msg='cells(1) must be larger than 1')
call MPI_Bcast(geomSize,3,MPI_DOUBLE,0,PETSC_COMM_WORLD, ierr)
if (ierr /= 0) error stop 'MPI error'
call MPI_Bcast(origin,3,MPI_DOUBLE,0,PETSC_COMM_WORLD, ierr)