Skip to content

Commit

Permalink
task_list: Reduce all integer members of task_list_type to 32 bit
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Jul 18, 2020
1 parent d6ab4f1 commit 0ace6f3
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 77 deletions.
9 changes: 3 additions & 6 deletions src/grid/grid_api.F
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ MODULE grid_api
GRID_FUNC_DYDZ, GRID_FUNC_DZ, GRID_FUNC_DZDX, GRID_FUNC_DZDZ, &
collocate_pgf_product_legacy => collocate_pgf_product
USE grid_integrate, ONLY: integrate_pgf_product
USE kinds, ONLY: dp,&
int_8
USE kinds, ONLY: dp
USE realspace_grid_types, ONLY: realspace_grid_type
#include "../base/base_uses.f90"

Expand Down Expand Up @@ -110,7 +109,7 @@ SUBROUTINE collocate_pgf_product(la_max, zeta, la_min, &
INTEGER, INTENT(IN) :: ga_gb_function
REAL(KIND=dp), INTENT(IN) :: radius
LOGICAL, OPTIONAL :: use_subpatch
INTEGER(KIND=int_8), INTENT(IN), OPTIONAL :: subpatch_pattern
INTEGER, INTENT(IN), OPTIONAL :: subpatch_pattern

CHARACTER(len=*), PARAMETER :: routineN = 'collocate_pgf_product', &
routineP = moduleN//':'//routineN
Expand Down Expand Up @@ -173,9 +172,7 @@ END SUBROUTINE grid_collocate_pgf_product_cpu

my_subpatch_pattern = 0
IF (PRESENT(subpatch_pattern)) THEN
! TODO: why is subpatch_pattern int_8, shouldn't 4 bytes suffice?
CPASSERT(ABS(subpatch_pattern) <= 256)
my_subpatch_pattern = INT(subpatch_pattern)
my_subpatch_pattern = subpatch_pattern
ENDIF

IF (2.0_dp*radius < MAXVAL(ABS(rsgrid%desc%dh))) THEN
Expand Down
7 changes: 3 additions & 4 deletions src/grid/grid_collocate.F
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ MODULE grid_collocate
prepare_diadib,&
prepare_diiadiib,&
prepare_dijadijb
USE kinds, ONLY: dp,&
int_8
USE kinds, ONLY: dp
USE mathconstants, ONLY: fac
USE orbital_pointers, ONLY: coset,&
ncoset
Expand Down Expand Up @@ -106,7 +105,7 @@ SUBROUTINE collocate_pgf_product(la_max, zeta, la_min, &
INTEGER, INTENT(IN) :: ga_gb_function
REAL(KIND=dp), INTENT(IN) :: radius
LOGICAL, OPTIONAL :: use_subpatch
INTEGER(KIND=int_8), INTENT(IN), OPTIONAL :: subpatch_pattern
INTEGER, INTENT(IN), OPTIONAL :: subpatch_pattern

CHARACTER(len=*), PARAMETER :: routineN = 'collocate_pgf_product', &
routineP = moduleN//':'//routineN
Expand Down Expand Up @@ -413,7 +412,7 @@ SUBROUTINE collocate_pgf_product_part2(la_max_local, zeta, la_min_local, &
TYPE(cube_info_type), INTENT(IN) :: cube_info
REAL(KIND=dp), INTENT(IN) :: radius
LOGICAL, OPTIONAL :: use_subpatch
INTEGER(KIND=int_8), OPTIONAL, INTENT(IN):: subpatch_pattern
INTEGER, OPTIONAL, INTENT(IN) :: subpatch_pattern
INTEGER, INTENT(IN) :: lp, lmax
CHARACTER(len=*), PARAMETER :: routineN = 'collocate_pgf_product_part2', &
Expand Down
5 changes: 2 additions & 3 deletions src/grid/grid_integrate.F
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ MODULE grid_integrate
return_cube_nonortho
USE d3_poly, ONLY: poly_d32cp2k
USE gauss_colloc, ONLY: integrateGaussFull
USE kinds, ONLY: dp,&
int_8
USE kinds, ONLY: dp
USE mathconstants, ONLY: fac
USE orbital_pointers, ONLY: coset,&
current_maxl,&
Expand Down Expand Up @@ -118,7 +117,7 @@ SUBROUTINE integrate_pgf_product(la_max, zeta, la_min, &
REAL(KIND=dp), DIMENSION(3, 3), OPTIONAL :: my_virial_a, my_virial_b
REAL(KIND=dp), DIMENSION(:, :, :, :), OPTIONAL, POINTER :: a_hdab
LOGICAL, OPTIONAL :: use_subpatch
INTEGER(KIND=int_8), INTENT(IN), OPTIONAL :: subpatch_pattern
INTEGER, INTENT(IN), OPTIONAL :: subpatch_pattern
CHARACTER(len=*), PARAMETER :: routineN = 'integrate_pgf_product_rspace', &
routineP = moduleN//':'//routineN
Expand Down
8 changes: 3 additions & 5 deletions src/hirshfeld_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ MODULE hirshfeld_methods
radius_vdw,&
shape_function_density,&
shape_function_gaussian
USE kinds, ONLY: dp,&
int_8
USE kinds, ONLY: dp
USE mathconstants, ONLY: pi
USE message_passing, ONLY: mp_sum
USE particle_types, ONLY: particle_type
Expand Down Expand Up @@ -417,8 +416,7 @@ SUBROUTINE calculate_hirshfeld_normalization(qs_env, hirshfeld_env)

INTEGER :: atom_a, handle, iatom, iex, ikind, &
ithread, j, natom, npme, nthread, &
numexp
INTEGER(KIND=int_8) :: subpatch_pattern
numexp, subpatch_pattern
INTEGER, DIMENSION(:), POINTER :: atom_list, cores
REAL(KIND=dp) :: alpha, coef, eps_rho_rspace, radius
REAL(KIND=dp), DIMENSION(3) :: ra
Expand Down Expand Up @@ -621,7 +619,7 @@ SUBROUTINE hirshfeld_integration(qs_env, hirshfeld_env, rfun, fval, fderiv)
rs_v, cell, pw_env%cube_info(1), hab, pab=pab, o1=0, o2=0, &
radius=radius, calculate_forces=do_force, &
force_a=force_a, force_b=force_b, use_virial=.FALSE., &
use_subpatch=.TRUE., subpatch_pattern=0_int_8)
use_subpatch=.TRUE., subpatch_pattern=0)
fval(atom_a) = fval(atom_a) + hab(1, 1)*dvol*coef
IF (do_force) THEN
fderiv(:, atom_a) = fderiv(:, atom_a) + force_a(:)*dvol
Expand Down
5 changes: 2 additions & 3 deletions src/mixed_cdft_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ MODULE mixed_cdft_methods
section_vals_type,&
section_vals_val_get
USE kinds, ONLY: default_path_length,&
dp,&
int_8
dp
USE machine, ONLY: m_walltime
USE mathlib, ONLY: diamat_all
USE memory_utilities, ONLY: reallocate
Expand Down Expand Up @@ -2608,7 +2607,7 @@ SUBROUTINE mixed_becke_constraint_init(force_env, mixed_cdft, calculate_forces,
rs_cavity, cell, mixed_cdft%pw_env%cube_info(1), &
radius=radius, ga_gb_function=GRID_FUNC_AB, &
use_subpatch=.TRUE., &
subpatch_pattern=0_int_8)
subpatch_pattern=0)
ENDIF
END DO
END DO
Expand Down
7 changes: 3 additions & 4 deletions src/qmmm_image_charge.F
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ MODULE qmmm_image_charge
section_vals_type,&
section_vals_val_get
USE kinds, ONLY: default_path_length,&
dp,&
int_8
dp
USE mathconstants, ONLY: pi
USE memory_utilities, ONLY: reallocate
USE message_passing, ONLY: mp_bcast,&
Expand Down Expand Up @@ -434,7 +433,7 @@ SUBROUTINE integrate_potential_ga_rspace(potential, qmmm_env, qs_env, int_res, &
0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), &
rs_v, cell, pw_env%cube_info(1), hab, o1=0, o2=0, &
radius=radius, calculate_forces=.FALSE., &
use_subpatch=.TRUE., subpatch_pattern=0_int_8)
use_subpatch=.TRUE., subpatch_pattern=0)

int_res(iatom) = hab(1, 1)

Expand Down Expand Up @@ -561,7 +560,7 @@ SUBROUTINE integrate_potential_devga_rspace(potential, coeff, forces, qmmm_env,
rs_v, cell, pw_env%cube_info(1), hab, pab, o1=0, o2=0, &
radius=radius, calculate_forces=.TRUE., &
force_a=force_a, force_b=force_b, use_subpatch=.TRUE., &
subpatch_pattern=0_int_8)
subpatch_pattern=0)

force_a(:) = coeff(iatom)*force_a(:)
forces(:, iatom) = force_a(:)
Expand Down
6 changes: 2 additions & 4 deletions src/qs_cdft_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ MODULE qs_cdft_methods
section_vals_type
USE kahan_sum, ONLY: accurate_dot_product,&
accurate_sum
USE kinds, ONLY: dp,&
int_8
USE kinds, ONLY: dp
USE message_passing, ONLY: mp_sum
USE particle_types, ONLY: particle_type
USE pw_env_types, ONLY: pw_env_get,&
Expand Down Expand Up @@ -1163,8 +1162,7 @@ SUBROUTINE hirshfeld_constraint_low(qs_env)

INTEGER :: atom_a, handle, i, iatom, iex, igroup, &
ikind, ithread, j, natom, npme, &
nthread, numexp
INTEGER(KIND=int_8) :: subpatch_pattern
nthread, numexp, subpatch_pattern
INTEGER, DIMENSION(:), POINTER :: atom_list, cores
LOGICAL, ALLOCATABLE, DIMENSION(:) :: compute_charge, is_constraint
REAL(kind=dp) :: alpha, coef, dvol, eps_rho_rspace, &
Expand Down
5 changes: 2 additions & 3 deletions src/qs_cdft_utils.F
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ MODULE qs_cdft_utils
section_vals_type,&
section_vals_val_get
USE kinds, ONLY: default_path_length,&
dp,&
int_8
dp
USE memory_utilities, ONLY: reallocate
USE outer_scf_control_types, ONLY: outer_scf_read_parameters
USE particle_list_types, ONLY: particle_list_type
Expand Down Expand Up @@ -386,7 +385,7 @@ SUBROUTINE becke_constraint_init(qs_env)
(/0.0_dp, 0.0_dp, 0.0_dp/), 1.0_dp, &
pab, 0, 0, rs_cavity, cell, pw_env%cube_info(1), &
radius=radius, ga_gb_function=GRID_FUNC_AB, &
use_subpatch=.TRUE., subpatch_pattern=0_int_8)
use_subpatch=.TRUE., subpatch_pattern=0)
ENDIF
END DO
END DO
Expand Down
28 changes: 12 additions & 16 deletions src/qs_collocate_density.F
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ MODULE qs_collocate_density
USE input_constants, ONLY: &
orb_dx2, orb_dxy, orb_dy2, orb_dyz, orb_dz2, orb_dzx, orb_px, orb_py, orb_pz, orb_s
USE kinds, ONLY: default_string_length,&
dp,&
int_8
dp
USE lgrid_types, ONLY: lgrid_allocate_grid,&
lgrid_type
USE lri_environment_types, ONLY: lri_kind_type
Expand Down Expand Up @@ -158,8 +157,7 @@ SUBROUTINE calculate_rho_nlcc(rho_nlcc, qs_env)

INTEGER :: atom_a, handle, iatom, iexp_nlcc, ikind, &
ithread, j, n, natom, nc, nexp_nlcc, &
ni, npme, nthread
INTEGER(KIND=int_8) :: subpatch_pattern
ni, npme, nthread, subpatch_pattern
INTEGER, DIMENSION(:), POINTER :: atom_list, cores, nct_nlcc
LOGICAL :: nlcc
REAL(KIND=dp) :: alpha, eps_rho_rspace, radius
Expand Down Expand Up @@ -342,8 +340,8 @@ SUBROUTINE calculate_ppl_grid(vppl, qs_env)
routineP = moduleN//':'//routineN

INTEGER :: atom_a, handle, iatom, ikind, ithread, &
j, lppl, n, natom, ni, npme, nthread
INTEGER(KIND=int_8) :: subpatch_pattern
j, lppl, n, natom, ni, npme, nthread, &
subpatch_pattern
INTEGER, DIMENSION(:), POINTER :: atom_list, cores
REAL(KIND=dp) :: alpha, eps_rho_rspace, radius
REAL(KIND=dp), DIMENSION(3) :: ra
Expand Down Expand Up @@ -865,8 +863,8 @@ SUBROUTINE calculate_rho_core(rho_core, total_rho, qs_env, only_nopaw)
routineP = moduleN//':'//routineN

INTEGER :: atom_a, handle, iatom, ikind, ithread, &
j, natom, npme, nthread
INTEGER(KIND=int_8) :: subpatch_pattern
j, natom, npme, nthread, &
subpatch_pattern
INTEGER, DIMENSION(:), POINTER :: atom_list, cores
LOGICAL :: my_only_nopaw, paw_atom
REAL(KIND=dp) :: alpha, eps_rho_rspace, radius
Expand Down Expand Up @@ -998,8 +996,8 @@ SUBROUTINE calculate_rho_single_gaussian(rho_gb, qs_env, iatom_in)
CHARACTER(len=*), PARAMETER :: routineN = 'calculate_rho_single_gaussian', &
routineP = moduleN//':'//routineN

INTEGER :: atom_a, handle, iatom, npme
INTEGER(KIND=int_8) :: subpatch_pattern
INTEGER :: atom_a, handle, iatom, npme, &
subpatch_pattern
REAL(KIND=dp) :: eps_rho_rspace, radius
REAL(KIND=dp), DIMENSION(3) :: ra
REAL(KIND=dp), DIMENSION(:, :), POINTER :: pab
Expand Down Expand Up @@ -1093,8 +1091,8 @@ SUBROUTINE calculate_rho_metal(rho_metal, coeff, total_rho_metal, qs_env)
CHARACTER(len=*), PARAMETER :: routineN = 'calculate_rho_metal', &
routineP = moduleN//':'//routineN

INTEGER :: atom_a, handle, iatom, j, natom, npme
INTEGER(KIND=int_8) :: subpatch_pattern
INTEGER :: atom_a, handle, iatom, j, natom, npme, &
subpatch_pattern
INTEGER, DIMENSION(:), POINTER :: cores
REAL(KIND=dp) :: eps_rho_rspace, radius
REAL(KIND=dp), DIMENSION(3) :: ra
Expand Down Expand Up @@ -1203,8 +1201,7 @@ SUBROUTINE calculate_rho_resp_single(rho_gb, qs_env, eta, iatom_in)
CHARACTER(len=*), PARAMETER :: routineN = 'calculate_rho_resp_single', &
routineP = moduleN//':'//routineN

INTEGER :: handle, iatom, npme
INTEGER(KIND=int_8) :: subpatch_pattern
INTEGER :: handle, iatom, npme, subpatch_pattern
REAL(KIND=dp) :: eps_rho_rspace, radius
REAL(KIND=dp), DIMENSION(3) :: ra
REAL(KIND=dp), DIMENSION(:, :), POINTER :: pab
Expand Down Expand Up @@ -1301,8 +1298,7 @@ SUBROUTINE calculate_rho_resp_all(rho_resp, coeff, natom, eta, qs_env)
CHARACTER(len=*), PARAMETER :: routineN = 'calculate_rho_resp_all', &
routineP = moduleN//':'//routineN

INTEGER :: handle, iatom, j, npme
INTEGER(KIND=int_8) :: subpatch_pattern
INTEGER :: handle, iatom, j, npme, subpatch_pattern
INTEGER, DIMENSION(:), POINTER :: cores
REAL(KIND=dp) :: eps_rho_rspace, radius
REAL(KIND=dp), DIMENSION(3) :: ra
Expand Down
9 changes: 4 additions & 5 deletions src/qs_integrate_potential_single.F
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ MODULE qs_integrate_potential_single
USE gaussian_gridlevels, ONLY: gaussian_gridlevel,&
gridlevel_info_type
USE grid_api, ONLY: integrate_pgf_product
USE kinds, ONLY: dp,&
int_8
USE kinds, ONLY: dp
USE lri_environment_types, ONLY: lri_kind_type
USE memory_utilities, ONLY: reallocate
USE message_passing, ONLY: mp_sum
Expand Down Expand Up @@ -256,7 +255,7 @@ SUBROUTINE integrate_ppl_rspace(rho_rspace, qs_env)
radius=radius, &
calculate_forces=.TRUE., force_a=force_a, &
force_b=force_b, use_virial=use_virial, my_virial_a=my_virial_a, &
my_virial_b=my_virial_b, use_subpatch=.TRUE., subpatch_pattern=0_int_8)
my_virial_b=my_virial_b, use_subpatch=.TRUE., subpatch_pattern=0)
force(ikind)%gth_ppl(:, iatom) = &
force(ikind)%gth_ppl(:, iatom) + force_a(:)*rho_rspace%pw%pw_grid%dvol
Expand Down Expand Up @@ -457,7 +456,7 @@ SUBROUTINE integrate_rho_nlcc(rho_rspace, qs_env)
radius=radius, &
calculate_forces=.TRUE., force_a=force_a, &
force_b=force_b, use_virial=use_virial, my_virial_a=my_virial_a, &
my_virial_b=my_virial_b, use_subpatch=.TRUE., subpatch_pattern=0_int_8)
my_virial_b=my_virial_b, use_subpatch=.TRUE., subpatch_pattern=0)
force(ikind)%gth_nlcc(:, iatom) = &
force(ikind)%gth_nlcc(:, iatom) + force_a(:)*rho_rspace%pw%pw_grid%dvol
Expand Down Expand Up @@ -615,7 +614,7 @@ SUBROUTINE integrate_v_core_rspace(v_rspace, qs_env)
radius=radius, &
calculate_forces=.TRUE., force_a=force_a, &
force_b=force_b, use_virial=use_virial, my_virial_a=my_virial_a, &
my_virial_b=my_virial_b, use_subpatch=.TRUE., subpatch_pattern=0_int_8)
my_virial_b=my_virial_b, use_subpatch=.TRUE., subpatch_pattern=0)
IF (ASSOCIATED(force)) THEN
force(ikind)%rho_core(:, iatom) = force(ikind)%rho_core(:, iatom) + force_a(:)
Expand Down

0 comments on commit 0ace6f3

Please sign in to comment.