program main use mpi implicit none real, allocatable :: send(:,:), recv(:,:) integer :: ijmax, kmax, ke ijmax = 100 kmax = 100 ke = 90 allocate(send(ijmax,kmax), recv(ijmax,kmax)) call MPI_REDUCE(send(:,:ke), recv(:,:ke), count, MPI_REAL, & MPI_SUM, 0, MPI_COMM_WORLD, ierr) end program main