mp_alltoall_z44 Subroutine

private subroutine mp_alltoall_z44(sb, rb, count, group)

All-to-all data exchange, rank 4 data, equal sizes

Note

see mp_alltoall_z

Arguments

Type IntentOptional Attributes Name
complex(kind=real_8), intent(in), DIMENSION(:, :, :, :), CONTIGUOUS :: sb
complex(kind=real_8), intent(out), DIMENSION(:, :, :, :), CONTIGUOUS :: rb
integer, intent(in) :: count
type(mp_comm_type), intent(in) :: group

Source Code

      SUBROUTINE mp_alltoall_z44(sb, rb, count, group)
      !! All-to-all data exchange, rank 4 data, equal sizes
      !! @note see mp_alltoall_z

         COMPLEX(kind=real_8), DIMENSION(:, :, :, :), CONTIGUOUS, &
            INTENT(IN)                            :: sb
         COMPLEX(kind=real_8), DIMENSION(:, :, :, :), CONTIGUOUS, &
            INTENT(OUT)                           :: rb
         INTEGER, INTENT(IN)                      :: count
         TYPE(mp_comm_type), INTENT(IN)           :: group

         CHARACTER(LEN=*), PARAMETER :: routineN = 'mp_alltoall_z44'

         INTEGER                                  :: handle, ierr
#if defined(__parallel)
         INTEGER                                  :: msglen, np
#endif

         ierr = 0
         CALL timeset(routineN, handle)

#if defined(__parallel)
         CALL mpi_alltoall(sb, count, MPI_DOUBLE_COMPLEX, &
                           rb, count, MPI_DOUBLE_COMPLEX, group%handle, ierr)
         IF (ierr /= 0) CALL mp_stop(ierr, "mpi_alltoall @ "//routineN)
         CALL mpi_comm_size(group%handle, np, ierr)
         IF (ierr /= 0) CALL mp_stop(ierr, "mpi_comm_size @ "//routineN)
         msglen = 2*count*np
         CALL add_perf(perf_id=6, msg_size=msglen*(2*real_8_size))
#else
         MARK_USED(count)
         MARK_USED(group)
         rb = sb
#endif
         CALL timestop(handle)

      END SUBROUTINE mp_alltoall_z44