	program profiling1
	implicit none
        integer N
	parameter (N=1024)
	double precision a(N,N),b(N,N),c(N,N)
        integer i,j,k

        call initializeArrays(N,a,b,c)
	call myMm(N,a,b,c)
        end



        subroutine myMm(N,a,b,c)
        implicit none
        integer N,i,j,k
        double precision a(N,N),b(N,N),c(N,N)

        do i = 1, N
           do j = 1, N
              do k = 1, N
                c(j,i) = c(j,i) + a(j,k)*b(k,i)
              enddo
           enddo
        enddo
        return
        end

	subroutine initializeArrays(N,a,b,c)
        implicit none
        integer i,j,N
        double precision a(N,N),b(N,N),c(N,N)
        do i = 1, N
           do j = 1, N
             a(j,i) = dsqrt(dble(i+2*j))
             b(j,i) = dexp(dble(2*i+j)/dble(N))
             c(j,i) = 0.0000000000000d000
           enddo
        enddo
        return
        end


