diff --git a/src/polychord/generate.F90 b/src/polychord/generate.F90 index 80440d97..78fbed26 100644 --- a/src/polychord/generate.F90 +++ b/src/polychord/generate.F90 @@ -199,7 +199,7 @@ function prior(cube) result(theta) end if - call scatter_points(live_points,live_point,mpi_information,settings%nTotal) + call scatter_points(live_points,live_point,mpi_information) ! if live points have been set to -1 then exit loop if (any(live_point<0)) exit @@ -212,7 +212,7 @@ function prior(cube) result(theta) if(live_point(settings%l0)>settings%logzero) total_time = total_time + time1-time0 - call gather_points(live_points,live_point,mpi_information,settings%nTotal) + call gather_points(live_points,live_point,mpi_information) ! Recieve a point from any worker if (is_root(mpi_information)) then diff --git a/src/polychord/mpi_utils.F90 b/src/polychord/mpi_utils.F90 index b8ee83eb..2100e3ad 100644 --- a/src/polychord/mpi_utils.F90 +++ b/src/polychord/mpi_utils.F90 @@ -383,20 +383,19 @@ end subroutine throw_point !! !! This a process by which a worker node 'throws' a point to the root - subroutine scatter_points(live_points,live_point,mpi_information,nTotal) + subroutine scatter_points(live_points,live_point,mpi_information) implicit none real(dp),intent(in),dimension(:) :: live_points !> live points to throw real(dp),intent(out),dimension(:) :: live_point !> live point to catch type(mpi_bundle), intent(in) :: mpi_information - integer, intent(in) :: nTotal call MPI_SCATTER( &! live_points, &! - nTotal, &! + size(live_point), &! MPI_DOUBLE_PRECISION, &! live_point, &! - nTotal, &! + size(live_point), &! MPI_DOUBLE_PRECISION, &! mpi_information%root, &! mpi_information%communicator,&! @@ -412,20 +411,19 @@ end subroutine scatter_points !! all points to the root. - subroutine gather_points(live_points,live_point,mpi_information,nTotal) + subroutine gather_points(live_points,live_point,mpi_information) implicit none real(dp),intent(in),dimension(:) :: live_point !> live point to throw real(dp),intent(out),dimension(:) :: live_points !> live points to catch type(mpi_bundle), intent(in) :: mpi_information - integer, intent(in) :: nTotal call MPI_GATHER( &! live_point, &! - nTotal, &! + size(live_point), &! MPI_DOUBLE_PRECISION, &! live_points, &! - nTotal, &! + size(live_point), &! MPI_DOUBLE_PRECISION, &! mpi_information%root, &! mpi_information%communicator,&!