README.md 1.24 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
   subroutine kernel(A,B,C,D,pa,pb,pc,pd,asiz)
      integer :: ii,jj
      integer :: asiz
      real(wp) , allocatable, dimension(:) :: A,B,C,D ! Arrays
      real(wp) :: pa,pb,pc,pd                         ! Parameters
      do ii=1,100
            !dir$ vector aligned
            do jj=1,asiz
               !Simple kernel
               a(jj) =  pa*(pb+b(jj))+pc+pd*c(jj)   ! Line (do not remove this comment )
            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.