mp_alltoall_c44 Subroutine

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

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

Arguments

TypeIntentOptionalAttributesName
complex(kind=real_4), intent(in), DIMENSION(:, :, :, :), CONTIGUOUS:: sb
complex(kind=real_4), intent(out), DIMENSION(:, :, :, :), CONTIGUOUS:: rb
integer, intent(in) :: count
integer, intent(in) :: group

Contents

Source Code


Source Code

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

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

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

         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_COMPLEX, &
                           rb, count, MPI_COMPLEX, group, ierr)
         IF (ierr /= 0) CALL mp_stop(ierr, "mpi_alltoall @ "//routineN)
         CALL mpi_comm_size(group, 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_4_size))
#else
         MARK_USED(count)
         MARK_USED(group)
         rb = sb
#endif
         CALL timestop(handle)

      END SUBROUTINE mp_alltoall_c44