1
0
mirror of https://github.com/TREX-CoE/irpjast.git synced 2024-12-22 04:14:54 +01:00

Changes after Zoom with William

This commit is contained in:
Anthony Scemama 2021-03-10 21:26:25 +01:00
parent 04113a93d5
commit 7fe8e3d214
6 changed files with 43 additions and 15 deletions

View File

@ -1,6 +1,6 @@
IRPF90 = irpf90/bin/irpf90 --codelet=factor_een:2 #-s nelec:10 -s nnuc:2 -s ncord:5 #-a -d
FC = ifort -xCORE-AVX512 -g -mkl=sequential
FCFLAGS= -O2 -I .
IRPF90 = irpf90/bin/irpf90 --codelet=factor_een:2 --align=4096 # -s nelec_8:504 -s nnuc:100 -s ncord:5 #-a -d
FC = ifort -xCORE-AVX512 -g -mkl=sequential -qopt-zmm-usage=high
FCFLAGS= -O3 -I .
NINJA = ninja
ARCHIVE = ar crs
RANLIB = ranlib

View File

@ -3,7 +3,7 @@ program codelet_factor_een_blas
implicit none
integer :: i
double precision :: ticks_0, ticks_1, cpu_0, cpu_1
integer, parameter :: irp_imax = 200
integer, parameter :: irp_imax = 100
PROVIDE factor_een_blas tmp_c

View File

@ -1,5 +1,5 @@
BEGIN_PROVIDER [ double precision, tmp_c, (nelec,nnuc,0:ncord,0:ncord-1) ]
&BEGIN_PROVIDER [ double precision, dtmp_c, (nelec,4,nnuc,0:ncord,0:ncord-1) ]
BEGIN_PROVIDER [ double precision, tmp_c, (nelec_8,nnuc,0:ncord,0:ncord-1) ]
&BEGIN_PROVIDER [ double precision, dtmp_c, (nelec_8,4,nnuc,0:ncord,0:ncord-1) ]
implicit none
BEGIN_DOC
! Calculate the intermediate buffers
@ -32,7 +32,7 @@ END_PROVIDER
BEGIN_PROVIDER [ double precision, factor_een_blas ]
&BEGIN_PROVIDER [ double precision, factor_een_deriv_e_blas, (nelec,4) ]
&BEGIN_PROVIDER [ double precision, factor_een_deriv_e_blas, (nelec_8,4) ]
implicit none
BEGIN_DOC
! Dimensions 1-3 : dx, dy, dz
@ -44,7 +44,7 @@ END_PROVIDER
! double precision,dimension(:),allocatable :: cn
factor_een_blas = 0.0d0
factor_een_deriv_e_blas(1:nelec,1:4) = 0.0d0
factor_een_deriv_e_blas(:,:) = 0.0d0
do n = 1, dim_cord_vect

View File

@ -1,3 +1,25 @@
integer function size_8(n)
implicit none
integer, intent(in) :: n
integer :: n8
n8 = ((n-1)/8+1) * 8
if (popcnt(n8) == 1) then
! Power of two, shift by 8
n8 = n8 + 8
endif
size_8 = n8
end
BEGIN_PROVIDER [ integer, nelec_8 ]
implicit none
integer, external :: size_8
nelec_8 = size_8(nelec)
END_PROVIDER
BEGIN_PROVIDER [ integer, nelec ]
implicit none
BEGIN_DOC

View File

@ -8,6 +8,12 @@ BEGIN_PROVIDER [ integer, nnuc ]
nnuc = nelec/5
END_PROVIDER
BEGIN_PROVIDER [ integer, nnuc_8 ]
implicit none
integer, external :: size_8
nnuc_8 = size_8(nnuc)
END_PROVIDER
BEGIN_PROVIDER [ integer, typenuc ]
&BEGIN_PROVIDER [integer, typenuc_arr, (nnuc)]

View File

@ -14,7 +14,7 @@ BEGIN_PROVIDER [ double precision, kappa_inv ]
kappa_inv = 1.0d0 / kappa
END_PROVIDER
BEGIN_PROVIDER [ double precision, rescale_ee, (nelec, nelec) ]
BEGIN_PROVIDER [ double precision, rescale_ee, (nelec_8, nelec) ]
implicit none
BEGIN_DOC
! R = (1 - exp(-kappa r))/kappa for electron-electron for $J_{ee}$
@ -60,7 +60,7 @@ BEGIN_PROVIDER [ double precision, rescale_ee_deriv_e, (4, nelec, nelec) ]
enddo
END_PROVIDER
BEGIN_PROVIDER [ double precision, rescale_en, (nelec, nnuc) ]
BEGIN_PROVIDER [ double precision, rescale_en, (nelec_8, nnuc) ]
implicit none
BEGIN_DOC
! R = (1 - exp(-kappa r))/kappa for electron-nucleus for $J_{en}$
@ -102,7 +102,7 @@ BEGIN_PROVIDER [ double precision, rescale_en_deriv_e, (4, nelec, nnuc) ]
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, rescale_een_e, (nelec, nelec, 0:ncord)]
BEGIN_PROVIDER [double precision, rescale_een_e, (nelec_8, nelec, 0:ncord)]
implicit none
BEGIN_DOC
! R = exp(-kappa r) for electron-electron for $J_{een}$
@ -159,7 +159,7 @@ BEGIN_PROVIDER [double precision, rescale_een_e_ij, (nelec*(nelec-1)/2, 0:ncord)
END_PROVIDER
BEGIN_PROVIDER [double precision, rescale_een_n, (nelec, nnuc, 0:ncord)]
BEGIN_PROVIDER [double precision, rescale_een_n, (nelec_8, nnuc, 0:ncord)]
implicit none
BEGIN_DOC
! R = exp(-kappa r) for electron-electron for $J_{een}$
@ -186,7 +186,7 @@ BEGIN_PROVIDER [double precision, rescale_een_n, (nelec, nnuc, 0:ncord)]
END_PROVIDER
BEGIN_PROVIDER [double precision, rescale_een_n_deriv_e, (nelec, 4, nnuc, 0:ncord)]
BEGIN_PROVIDER [double precision, rescale_een_n_deriv_e, (nelec_8, 4, nnuc, 0:ncord)]
implicit none
BEGIN_DOC
! Derivative of the scaled distance J_{een} wrt R_{ia}
@ -243,7 +243,7 @@ BEGIN_PROVIDER [double precision, elnuc_dist_deriv_e, (4, nelec, nnuc)]
end do
END_PROVIDER
BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e, (nelec, 4, nelec, 0:ncord)]
BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e, (nelec_8, 4, nelec, 0:ncord)]
BEGIN_DOC
! Derivative of the scaled distance J_{een} wrt R_{ia}
END_DOC
@ -279,7 +279,7 @@ BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e, (nelec, 4, nelec, 0:nco
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e_t, (nelec, 4, nelec, 0:ncord)]
BEGIN_PROVIDER [double precision, rescale_een_e_deriv_e_t, (nelec_8, 4, nelec, 0:ncord)]
implicit none
BEGIN_DOC
! Transposed rescale_een_e_deriv_e