35 integer,
parameter :: rk = kind(1.0d0)
36 integer,
intent(in) :: stateDim
37 integer,
intent(in) :: cnt
39 integer,
intent(in) :: comm
40 real(kind=rk),
dimension(stateDim,cnt),
intent(in) :: x
42 real(kind=rk),
dimension(stateDim*(stateDim+1)/2),
intent(out) :: Pf
49 real(kind=rk),
dimension(stateDim) :: mean
50 real(kind=rk),
dimension(stateDim,cnt) :: xp
58 call mpi_allreduce(cnt,m,1,mpi_integer,mpi_sum,comm,mpi_err)
59 if(mpi_err .ne. mpi_success)
then
60 write(emp_e,*)
'ERROR in generate_pf: mpi_allreduce 1 failed with flag ',mpi_err
65 xp(:,1) = sum(x,dim=2)
66 call mpi_allreduce(xp(:,1),mean,statedim,mpi_double_precision&
67 &,mpi_sum,comm,mpi_err)
68 if(mpi_err .ne. mpi_success)
then
69 write(emp_e,*)
'ERROR in generate_pf: mpi_allreduce 2 failed with flag ',mpi_err
73 call dscal(statedim,1.0d0/
real(m,rk),mean,1)
96 call mpi_allreduce(mpi_in_place,pf,statedim*(statedim+1)/2,mpi_double_precision&
97 &,mpi_sum,comm,mpi_err)
98 if(mpi_err .ne. mpi_success)
then
99 write(emp_e,*)
'ERROR in generate_pf: mpi_allreduce 3 failed with flag ',mpi_err
105 call dscal(statedim*(statedim+1)/2,1.0d0/
real(m-1,rk),pf,1)
Module that stores the information about the outputting from empire.
subroutine generate_pf(stateDim, cnt, comm, x, pf)
subroutine to generate Pf matrix given ensemble members on a communicator