transpose block size is makefile variable

This commit is contained in:
ignis 2019-05-03 14:44:51 +09:00
parent 14be42fa72
commit f4c917f769
2 changed files with 12 additions and 16 deletions

View file

@ -16,7 +16,7 @@ module m_calculate
real*8, allocatable, dimension(:,:,:) :: zsrc
real*8, allocatable, dimension(:,:,:) :: zdst
integer, parameter :: nb = 16
integer, parameter :: nb = BLOCKSIZE
private :: work, nb
private :: xsrc, xdst, zsrc, zdst
@ -128,17 +128,13 @@ contains
do j = 1,nyp
do k = 1,nzp
do i = 1,nxp
rsrc(i,k) = src(i,j,k)
end do
rsrc(:,k) = src(:,j,k)
end do
call dfp(nzp, hzp, rsrc, rdst, nxp, 3)
do k = 1,nzp
do i = 1,nxp
dst(i,j,k) = rdst(i,k)
end do
dst(:,j,k) = rdst(:,k)
end do
end do
@ -215,17 +211,13 @@ contains
do j = 1,nyp
do k = 1,nzp
do i = 1,nxp
rsrc(i,k) = src(i,j,k)
end do
rsrc(:,k) = src(:,j,k)
end do
call d2fp(nzp, hzp, rsrc, rdst, nxp, 3)
do k = 1,nzp
do i = 1,nxp
dst(i,j,k) = rdst(i,k)
end do
dst(:,j,k) = rdst(:,k)
end do
end do
@ -258,8 +250,8 @@ contains
DO jj=1,n2,nb
DO ii=1,n1,nb
DO j=jj,jj+nb-1
DO i=ii,ii+nb-1
DO j=jj,min(jj+nb-1,n2)
DO i=ii,min(ii+nb-1,n1)
a(i,j) = b(j,i)
ENDDO
ENDDO

View file

@ -2,7 +2,11 @@
#Neuman flags
#flags = -O3 -r8 -i8 -openmp -msse3 -axSSSE3 -m64 -fPIC -i_dynamic
#Cluster_2(16.161) flags
flags = -Wall -O3 -ffree-line-length-0 -fdefault-integer-8 -fdefault-double-8 -fdefault-real-8 -march=native
BLOCKSIZE?=16
flags = -cpp -DBLOCKSIZE=$(BLOCKSIZE) -Wall -O3 -ffree-line-length-0 -fdefault-integer-8 -fdefault-double-8 -fdefault-real-8 -march=native
ifdef CHECK
flags += -fcheck=all