this subroutine runs a random dgemm to create work so that timers and other testing utils work nicely
Usage: call dummy_work()
it will simply do a 256 by 256 dgemm, woo
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=dp), | private, | allocatable | :: | A(:,:) | |||
real(kind=dp), | private, | allocatable | :: | B(:,:) | |||
real(kind=dp), | private, | allocatable | :: | C(:,:) | |||
integer(kind=int64), | private | :: | i | ||||
integer(kind=int64), | private | :: | j | ||||
integer(kind=int64), | private | :: | k | ||||
integer(kind=default_int), | private | :: | m |
subroutine dummy_work() !! this subroutine runs a random dgemm to create work so that timers and other testing utils work nicely !! !! Usage: call dummy_work() !! !! it will simply do a 256 by 256 dgemm, woo integer(int64) :: i, j, k integer(default_int) :: m real(dp), allocatable :: A(:, :), B(:, :), C(:, :) m = 256_default_int allocate (A(m, m), B(m, m), C(m, m)) A = 1.0_dp B = 1.0_dp C = 0.0_dp do i = 1, m do j = 1, m do k = 1, m C(i, j) = C(i, j) + A(i, k)*B(k, j) end do end do end do print *, C(1, 1) deallocate (A, B, C) end subroutine dummy_work