Skip to content

Commit

Permalink
Changes after Zoom with William
Browse files Browse the repository at this point in the history
  • Loading branch information
scemama committed Mar 10, 2021
1 parent 04113a9 commit 7fe8e3d
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion codelet_factor_een_blas.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions el_nuc_el_blas.irp.f
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -32,7 +32,7 @@


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
Expand All @@ -44,7 +44,7 @@
! 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

Expand Down
22 changes: 22 additions & 0 deletions electrons.irp.f
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions nuclei.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
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)]
Expand Down
14 changes: 7 additions & 7 deletions rescale.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
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}$
Expand Down Expand Up @@ -60,7 +60,7 @@
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}$
Expand Down Expand Up @@ -102,7 +102,7 @@
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}$
Expand Down Expand Up @@ -159,7 +159,7 @@

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}$
Expand All @@ -186,7 +186,7 @@

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}
Expand Down Expand Up @@ -243,7 +243,7 @@
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
Expand Down Expand Up @@ -279,7 +279,7 @@
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
Expand Down

0 comments on commit 7fe8e3d

Please sign in to comment.