Skip to content
Permalink
Browse files

Cubic scaling RPA with DBCSR tensors (#278)

* Cubic scaling RPA with DBCSR tensors

This implementation is new default, old implementation of cubic scaling
RPA can still be used with `DO_DBCSR_T .FALSE.` in IM_TIME input
section (GW still based on old implementation).

* Cubic-scaling RPA: Change defaults of old implementation

Adapt filter parameters such that they are consistent with new
implementation. Also tweak time measurement. This is done in order to be
able to compare both implementation (time & accuracy) with the same
input parameters.

* Disable DBCSR tensors for GW tests
  • Loading branch information...
pseewald committed Apr 15, 2019
1 parent b1b4d4a commit ffd0abce85e6c590ba11416769c03bc978518988
Submodule dbcsr updated 76 files
+42 −0 .ci/daint.cscs.ch/Jenkinsfile
+36 −0 .ci/daint.cscs.ch/build.sh
+34 −0 .ci/daint.cscs.ch/test.sh
+3 −1 .flake8
+5 −8 .pre-commit-config.yaml
+22 −14 .pre-commit/check_header.py
+0 −3 .style.yapf
+4 −6 .travis.yml
+6 −5 CMakeLists.txt
+7 −6 CONTRIBUTING.md
+1 −1 README.md
+4 −4 VERSION
+40 −18 src/CMakeLists.txt
+1 −1 src/acc/libsmm_acc/libcusmm/README.md
+37 −18 src/acc/libsmm_acc/libcusmm/generate_kernels.py
+9 −5 src/acc/libsmm_acc/libcusmm/generate_parameters.py
+39 −6 src/acc/libsmm_acc/libcusmm/kernels/cusmm_dnt_base.py
+108 −43 src/acc/libsmm_acc/libcusmm/kernels/cusmm_dnt_largeDB1.py
+108 −43 src/acc/libsmm_acc/libcusmm/kernels/cusmm_dnt_largeDB2.py
+100 −45 src/acc/libsmm_acc/libcusmm/kernels/cusmm_dnt_medium.py
+109 −48 src/acc/libsmm_acc/libcusmm/kernels/cusmm_dnt_small.py
+79 −32 src/acc/libsmm_acc/libcusmm/kernels/cusmm_dnt_tiny.py
+167 −86 src/acc/libsmm_acc/libcusmm/kernels/cusmm_predict.py
+2 −2 src/acc/libsmm_acc/libcusmm/predict.md
+148 −55 src/acc/libsmm_acc/libcusmm/predict_collect.py
+54 −18 src/acc/libsmm_acc/libcusmm/predict_derivepars.py
+45 −14 src/acc/libsmm_acc/libcusmm/predict_evaluate.py
+89 −26 src/acc/libsmm_acc/libcusmm/predict_genpars.py
+130 −31 src/acc/libsmm_acc/libcusmm/predict_helpers.py
+396 −135 src/acc/libsmm_acc/libcusmm/predict_train.py
+195 −0 src/acc/libsmm_acc/libcusmm/tune.md
+19 −5 src/acc/libsmm_acc/libcusmm/tune_collect.py
+11 −4 src/acc/libsmm_acc/libcusmm/tune_merge.py
+100 −32 src/acc/libsmm_acc/libcusmm/tune_setup.py
+12 −5 src/acc/libsmm_acc/libcusmm/tune_submit.py
+12 −48 src/block/dbcsr_block_operations.f90
+10 −1 src/dbcsr_api.F
+16 −1 src/ops/dbcsr_operations.F
+5 −0 src/tas/PACKAGE
+33 −0 src/tas/dbcsr_tas.fypp
+1,403 −0 src/tas/dbcsr_tas_base.F
+511 −0 src/tas/dbcsr_tas_global.F
+229 −0 src/tas/dbcsr_tas_io.F
+767 −0 src/tas/dbcsr_tas_mm.F
+992 −0 src/tas/dbcsr_tas_reshape_ops.F
+581 −0 src/tas/dbcsr_tas_split.F
+470 −0 src/tas/dbcsr_tas_test.F
+80 −0 src/tas/dbcsr_tas_types.F
+166 −0 src/tas/dbcsr_tas_util.F
+1 −1 src/tensors/PACKAGE
+1 −0 src/tensors/dbcsr_allocate_wrap.F
+53 −2 src/tensors/dbcsr_array_list_methods.F
+960 −314 src/tensors/dbcsr_tensor.F
+14 −6 src/tensors/dbcsr_tensor.fypp
+43 −4 src/tensors/dbcsr_tensor_api.F
+142 −72 src/tensors/dbcsr_tensor_block.F
+17 −12 src/tensors/dbcsr_tensor_index.F
+289 −0 src/tensors/dbcsr_tensor_io.F
+101 −71 src/tensors/dbcsr_tensor_reshape.F
+593 −0 src/tensors/dbcsr_tensor_split.F
+132 −179 src/tensors/dbcsr_tensor_test.F
+899 −125 src/tensors/dbcsr_tensor_types.F
+2 −0 tests/.gitignore
+17 −6 tests/CMakeLists.txt
+4 −2 tests/Makefile.inc
+148 −0 tests/dbcsr_tas_unittest.F
+443 −151 tests/dbcsr_tensor_unittest.F
+19 −8 tests/generate_libcusmm_timer_multiply.py
+7 −4 tests/generate_libcusmm_unittest_multiply.py
+18 −15 tests/libcusmm_timer_multiply.template
+13 −5 tools/build_utils/check_archives.py
+1 −1 tools/build_utils/fypp
+24 −8 tools/build_utils/makedep.py
+90 −22 tools/build_utils/test_makedep.py
+3 −2 tools/doxify/is_fypp.py
+1 −1 tools/fprettify
@@ -1261,6 +1261,26 @@ SUBROUTINE create_ri_im_time(section)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)

CALL keyword_create( &
keyword=keyword, &
name="DO_DBCSR_T", &
description="Uses DBCSR tensors for cubic scaling RPA/L-SOS-MP2", &
usage="DO_DBCSR_T", &
default_l_val=.TRUE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)

CALL keyword_create( &
keyword=keyword, &
name="MAX_BLOCK_SIZE_SQRT", &
description="Square root of maximum block size for splitting blocks of matrix representation of large tensors "// &
"along the combined dimension. "// &
"Atomic blocks are split in order to allow for better load balance.", &
default_i_val=10)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)

! here we generate a RPA imag. time subsection to use for MAOs
CALL create_mao_section(subsection)
CALL section_add_subsection(section, subsection)

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -296,6 +296,11 @@ SUBROUTINE read_mp2_section(input, mp2_env)
CALL section_vals_val_get(im_time_section, "RI_G0W0", &
l_val=mp2_env%ri_rpa_im_time%do_gw_im_time)

CALL section_vals_val_get(mp2_section, "IM_TIME%DO_DBCSR_T", &
l_val=mp2_env%ri_rpa_im_time%do_dbcsr_t)
CALL section_vals_val_get(mp2_section, "IM_TIME%MAX_BLOCK_SIZE_SQRT", &
i_val=mp2_env%ri_rpa_im_time%max_bsize_sqrt)

CALL section_vals_val_get(mp2_section, "RI_LAPLACE%QUADRATURE_POINTS", &
i_val=mp2_env%ri_laplace%n_quadrature)
CALL section_vals_val_get(mp2_section, "RI_LAPLACE%SIZE_INTEG_GROUP", &
@@ -145,6 +145,8 @@ MODULE mp2_types
INTEGER, DIMENSION(:), POINTER :: nmao_occ, nmao_virt
LOGICAL :: do_gw_im_time, do_im_time_kpoints
REAL(KIND=dp) :: stabilize_exp
LOGICAL :: do_dbcsr_t
INTEGER :: max_bsize_sqrt
END TYPE

TYPE ri_g0w0_type

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,4 +1,4 @@
&GLOBAL
&GLOBAL
PROJECT RI_RPA_H2O
PRINT_LEVEL MEDIUM
RUN_TYPE ENERGY
@@ -58,6 +58,7 @@
ERI_METHOD OS
IM_TIME
&IM_TIME
DO_DBCSR_T .FALSE.
GW
GROUP_SIZE_3c 1
GROUP_SIZE_P 1
@@ -71,11 +72,11 @@
&END SCREENING
&END HF
RPA_NUM_QUAD_POINTS 10
MINIMAX
MINIMAX
&RI_G0W0
CORR_MOS_OCC 10
CORR_MOS_VIRT 10
&END RI_G0W0
&END RI_G0W0
&END RI_RPA
MEMORY 200.
NUMBER_PROC 1
@@ -1,4 +1,4 @@
&GLOBAL
&GLOBAL
PROJECT RI_RPA_H2O
PRINT_LEVEL MEDIUM
RUN_TYPE ENERGY
@@ -51,6 +51,7 @@
ERI_METHOD OS
IM_TIME
&IM_TIME
DO_DBCSR_T .FALSE.
GW
GROUP_SIZE_3c 1
GROUP_SIZE_P 1
@@ -73,7 +74,7 @@
&PERIODIC
NUM_OMEGA_POINTS 100
&END
&END RI_G0W0
&END RI_G0W0
&END RI_RPA
MEMORY 200.
NUMBER_PROC 1
@@ -1,4 +1,4 @@
&GLOBAL
&GLOBAL
PROJECT RI_RPA_H2O
PRINT_LEVEL MEDIUM
RUN_TYPE ENERGY
@@ -48,6 +48,7 @@
RI OVERLAP
IM_TIME
&IM_TIME
DO_DBCSR_T .FALSE.
GW
&END IM_TIME
&RI_RPA
@@ -65,12 +66,12 @@
CORR_MOS_VIRT 10
NUMB_POLES 2
MAX_ITER_FIT 10000
CROSSING_SEARCH Z_SHOT
CROSSING_SEARCH Z_SHOT
FERMI_LEVEL_OFFSET 2.0E-2
EV_SC_ITER 1
HF_LIKE_EV_START FALSE
PRINT_GW_DETAILS
&END RI_G0W0
&END RI_G0W0
&END RI_RPA
MEMORY 200.
NUMBER_PROC 1
@@ -93,7 +94,7 @@
POTENTIAL GTH-PBE-q6
&END KIND
&TOPOLOGY
COORD_FILE_NAME OH_radical_gas.xyz
COORD_FILE_NAME OH_radical_gas.xyz
COORD_FILE_FORMAT xyz
&CENTER_COORDINATES
&END
@@ -1,4 +1,4 @@
&GLOBAL
&GLOBAL
PROJECT RI_RPA_H2O_minimax
PRINT_LEVEL MEDIUM
RUN_TYPE ENERGY
@@ -47,14 +47,15 @@
&WF_CORRELATION
METHOD RI_RPA_GPW
&WFC_GPW
! normally, this EPS_FILTER controls the accuracy and
! normally, this EPS_FILTER controls the accuracy and
! the time for the cubic_scaling RPA calculation
EPS_FILTER 1.0E-6
&END
ERI_METHOD OS
RI OVERLAP
IM_TIME
&IM_TIME
DO_DBCSR_T .FALSE.
GW
&END
&RI_RPA
@@ -1,4 +1,4 @@
&GLOBAL
&GLOBAL
PROJECT RI_RPA_H2O_minimax
PRINT_LEVEL MEDIUM
RUN_TYPE ENERGY
@@ -47,14 +47,15 @@
&WF_CORRELATION
METHOD RI_RPA_GPW
&WFC_GPW
! normally, this EPS_FILTER controls the accuracy and
! normally, this EPS_FILTER controls the accuracy and
! the time for the cubic_scaling RPA calculation
EPS_FILTER 1.0E-6
&END
ERI_METHOD OS
RI OVERLAP
IM_TIME
&IM_TIME
DO_DBCSR_T .FALSE.
GW
&END
&RI_RPA
@@ -1,4 +1,4 @@
&GLOBAL
&GLOBAL
PROJECT RPA_H2O_kpoints
PRINT_LEVEL MEDIUM
RUN_TYPE ENERGY
@@ -1,4 +1,4 @@
&GLOBAL
&GLOBAL
PROJECT RPA_H2O_kpoints
PRINT_LEVEL MEDIUM
RUN_TYPE ENERGY
@@ -1,4 +1,4 @@
&GLOBAL
&GLOBAL
PROJECT RI_RPA_H2O_minimax
PRINT_LEVEL MEDIUM
RUN_TYPE ENERGY
@@ -40,14 +40,15 @@
METHOD RI_RPA_GPW
RI OVERLAP
&WFC_GPW
! normally, this EPS_FILTER controls the accuracy and
! normally, this EPS_FILTER controls the accuracy and
! the time for the cubic_scaling RPA calculation
EPS_FILTER 1.0E-6
&END
! ERI_METHOD MME
ERI_METHOD OS
IM_TIME
&IM_TIME
DO_DBCSR_T .FALSE.
! normally, increase MEMORY_CUT for large systems
! not to run out of memory
MEMORY_CUT 2

0 comments on commit ffd0abc

Please sign in to comment.
You can’t perform that action at this time.