README.md 1.36 KB
Newer Older
otintopr's avatar
otintopr committed
Computational Kernel Analysis Tool
=====
otintopr's avatar
otintopr committed
###### Author: Oriol Tintó Prims
otintopr's avatar
otintopr committed

This tool was crated to study the computational behaviour of code kernels.

It is configured to work out-of-the-box in Marenostrum and produce few plots
to characterize a code kernel that has to be modified inside the src/kernels.f90
fortran file.

The file contains the following:
otintopr's avatar
otintopr committed
```
otintopr's avatar
otintopr committed
module kernels
   ! Double Precision -----------------------------------------------------
   INTEGER,PARAMETER :: wp = selected_real_kind(12, 307)
contains
otintopr's avatar
otintopr committed
   subroutine kernel(A,B,C,D,pa,pb,pc,pd,sizex,sizey)
      integer :: ii,jj,kk
      integer :: sizex,sizey
      real(wp) , allocatable, dimension(:,:) :: A,B,C,D ! Arrays
otintopr's avatar
otintopr committed
      real(wp) :: pa,pb,pc,pd                         ! Parameters
      do ii=1,100
            !dir$ vector aligned
otintopr's avatar
otintopr committed
            do kk=1,sizex
               !dir$ vector aligned
               do jj=1,sizey
                  !Simple kernel
                  a(jj,kk) = a(jj,kk)*b(jj,kk)+c(jj,kk)*d(jj,kk)   ! Line (do not remove this comment )
               end do
otintopr's avatar
otintopr committed
            end do
      end do
   end subroutine
end module
otintopr's avatar
otintopr committed
```
otintopr's avatar
otintopr committed

otintopr's avatar
otintopr committed
The line with ``!Line`` comment is the line that has to be modified with a code
otintopr's avatar
otintopr committed
kernel that can use 4 different arrays and 4 different parameters declared above.

otintopr's avatar
otintopr committed
Once this file is modified with the desired kernel, just execute the launch script and wait for results.