Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Computational Kernel Analysis Tool
=====
'''
Author
Oriol Tintó Prims
'''
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:
'''
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
'''
The line with ''!Line'' comment is the line that has to be modified with a code
kernel that can use 4 different arrays and 4 different parameters declared above.
Once this file is modified with the desired kernel, just execute the launch script and wait for results.