10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 04:43:45 +01:00

Improve I/O on TC integrals

This commit is contained in:
Anthony Scemama 2023-03-17 19:23:07 +01:00
parent 29230b175d
commit e710d26237
5 changed files with 118 additions and 193 deletions

View File

@ -370,16 +370,8 @@ BEGIN_PROVIDER [double precision, tc_grad_square_ao, (ao_num, ao_num, ao_num, ao
if(read_tc_integ) then if(read_tc_integ) then
open(unit=11, form="unformatted", file='tc_grad_square_ao', action="read") open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/tc_grad_square_ao', action="read")
do i = 1, ao_num read(11) tc_grad_square_ao
do j = 1, ao_num
do k = 1, ao_num
do l = 1, ao_num
read(11) tc_grad_square_ao(l,k,j,i)
enddo
enddo
enddo
enddo
close(11) close(11)
else else
@ -444,18 +436,12 @@ BEGIN_PROVIDER [double precision, tc_grad_square_ao, (ao_num, ao_num, ao_num, ao
!!$OMP END PARALLEL !!$OMP END PARALLEL
endif endif
if(write_tc_integ) then if(write_tc_integ.and.mpi_master) then
open(unit=11, form="unformatted", file='tc_grad_square_ao', action="write") open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/tc_grad_square_ao', action="write")
do i = 1, ao_num call ezfio_set_work_empty(.False.)
do j = 1, ao_num write(11) tc_grad_square_ao
do k = 1, ao_num
do l = 1, ao_num
write(11) tc_grad_square_ao(l,k,j,i)
enddo
enddo
enddo
enddo
close(11) close(11)
call ezfio_set_tc_keywords_io_tc_integ('Read')
endif endif
call wall_time(time1) call wall_time(time1)

View File

@ -18,16 +18,8 @@ BEGIN_PROVIDER [double precision, tc_grad_square_ao_test, (ao_num, ao_num, ao_nu
if(read_tc_integ) then if(read_tc_integ) then
open(unit=11, form="unformatted", file='tc_grad_square_ao_test', action="read") open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/tc_grad_square_ao_test', action="read")
do i = 1, ao_num read(11) tc_grad_square_ao_test
do j = 1, ao_num
do k = 1, ao_num
do l = 1, ao_num
read(11) tc_grad_square_ao_test(l,k,j,i)
enddo
enddo
enddo
enddo
close(11) close(11)
else else
@ -144,18 +136,12 @@ BEGIN_PROVIDER [double precision, tc_grad_square_ao_test, (ao_num, ao_num, ao_nu
endif endif
if(write_tc_integ) then if(write_tc_integ.and.mpi_master) then
open(unit=11, form="unformatted", file='tc_grad_square_ao_test', action="write") open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/tc_grad_square_ao_test', action="write")
do i = 1, ao_num call ezfio_set_work_empty(.False.)
do j = 1, ao_num write(11) tc_grad_square_ao_test
do k = 1, ao_num
do l = 1, ao_num
write(11) tc_grad_square_ao_test(l,k,j,i)
enddo
enddo
enddo
enddo
close(11) close(11)
call ezfio_set_tc_keywords_io_tc_integ('Read')
endif endif
call wall_time(time1) call wall_time(time1)

View File

@ -36,16 +36,8 @@ BEGIN_PROVIDER [ double precision, int2_grad1_u12_ao, (ao_num, ao_num, n_points_
if(read_tc_integ) then if(read_tc_integ) then
open(unit=11, form="unformatted", file='int2_grad1_u12_ao', action="read") open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/int2_grad1_u12_ao', action="read")
do m = 1, 3 read(11) int2_grad1_u12_ao
do ipoint = 1, n_points_final_grid
do j = 1, ao_num
do i = 1, ao_num
read(11) int2_grad1_u12_ao(i,j,ipoint,m)
enddo
enddo
enddo
enddo
close(11) close(11)
else else
@ -89,18 +81,12 @@ BEGIN_PROVIDER [ double precision, int2_grad1_u12_ao, (ao_num, ao_num, n_points_
endif endif
if(write_tc_integ) then if(write_tc_integ.and.mpi_master) then
open(unit=11, form="unformatted", file='int2_grad1_u12_ao', action="write") open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/int2_grad1_u12_ao', action="write")
do m = 1, 3 call ezfio_set_work_empty(.False.)
do ipoint = 1, n_points_final_grid write(11) int2_grad1_u12_ao
do j = 1, ao_num
do i = 1, ao_num
write(11) int2_grad1_u12_ao(i,j,ipoint,m)
enddo
enddo
enddo
enddo
close(11) close(11)
call ezfio_set_tc_keywords_io_tc_integ('Read')
endif endif
call wall_time(time1) call wall_time(time1)

View File

@ -35,18 +35,11 @@ BEGIN_PROVIDER [ double precision, int2_grad1_u12_ao_test, (ao_num, ao_num, n_po
if(read_tc_integ) then if(read_tc_integ) then
open(unit=11, form="unformatted", file='int2_grad1_u12_ao_test', action="read") open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/int2_grad1_u12_ao_test', action="read")
do m = 1, 3 read(11) int2_grad1_u12_ao_test
do ipoint = 1, n_points_final_grid
do j = 1, ao_num
do i = 1, ao_num
read(11) int2_grad1_u12_ao_test(i,j,ipoint,m)
enddo
enddo
enddo
enddo
close(11) close(11)
else else
if(j1b_type .eq. 3) then if(j1b_type .eq. 3) then
@ -87,18 +80,12 @@ BEGIN_PROVIDER [ double precision, int2_grad1_u12_ao_test, (ao_num, ao_num, n_po
endif endif
if(write_tc_integ) then if(write_tc_integ.and.mpi_master) then
open(unit=11, form="unformatted", file='int2_grad1_u12_ao_test', action="write") open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/int2_grad1_u12_ao_test', action="write")
do m = 1, 3 call ezfio_set_work_empty(.False.)
do ipoint = 1, n_points_final_grid write(11) int2_grad1_u12_ao_test
do j = 1, ao_num
do i = 1, ao_num
write(11) int2_grad1_u12_ao_test(i,j,ipoint,m)
enddo
enddo
enddo
enddo
close(11) close(11)
call ezfio_set_tc_keywords_io_tc_integ('Read')
endif endif
call wall_time(time1) call wall_time(time1)
@ -132,16 +119,8 @@ BEGIN_PROVIDER [double precision, tc_grad_and_lapl_ao_test, (ao_num, ao_num, ao_
if(read_tc_integ) then if(read_tc_integ) then
open(unit=11, form="unformatted", file='tc_grad_and_lapl_ao_test', action="read") open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/tc_grad_and_lapl_ao_test', action="read")
do i = 1, ao_num read(11) tc_grad_and_lapl_ao_test
do j = 1, ao_num
do k = 1, ao_num
do l = 1, ao_num
read(11) tc_grad_and_lapl_ao_test(l,k,j,i)
enddo
enddo
enddo
enddo
close(11) close(11)
else else
@ -204,18 +183,12 @@ BEGIN_PROVIDER [double precision, tc_grad_and_lapl_ao_test, (ao_num, ao_num, ao_
endif endif
if(write_tc_integ) then if(write_tc_integ.and.mpi_master) then
open(unit=11, form="unformatted", file='tc_grad_and_lapl_ao_test', action="write") open(unit=11, form="unformatted", file=trim(ezfio_filename)//'/work/tc_grad_and_lapl_ao_test', action="write")
do i = 1, ao_num call ezfio_set_work_empty(.False.)
do j = 1, ao_num write(11) tc_grad_and_lapl_ao_test
do k = 1, ao_num
do l = 1, ao_num
write(11) tc_grad_and_lapl_ao_test(l,k,j,i)
enddo
enddo
enddo
enddo
close(11) close(11)
call ezfio_set_tc_keywords_io_tc_integ('Read')
endif endif
call wall_time(time1) call wall_time(time1)

View File

@ -152,7 +152,7 @@ default: 0.
type: character*(32) type: character*(32)
doc: Type of TCSCF algorithm used. Possible choices are [Simple | DIIS] doc: Type of TCSCF algorithm used. Possible choices are [Simple | DIIS]
interface: ezfio,provider,ocaml interface: ezfio,provider,ocaml
default: Simple default: DIIS
[im_thresh_tcscf] [im_thresh_tcscf]
type: Threshold type: Threshold
@ -184,17 +184,11 @@ doc: If |true|, use VAR-TC
interface: ezfio,provider,ocaml interface: ezfio,provider,ocaml
default: False default: False
[read_tc_integ] [io_tc_integ]
type: logical type: Disk_access
doc: If |true|, read integrals: int2_grad1_u12_ao, tc_grad_square_ao and tc_grad_and_lapl_ao doc: Read/Write integrals int2_grad1_u12_ao, tc_grad_square_ao and tc_grad_and_lapl_ao from/to disk [ Write | Read | None ]
interface: ezfio,provider,ocaml interface: ezfio,provider,ocaml
default: False default: None
[write_tc_integ]
type: logical
doc: If |true|, write integrals: int2_grad1_u12_ao, tc_grad_square_ao and tc_grad_and_lapl_ao
interface: ezfio,provider,ocaml
default: False
[debug_tc_pt2] [debug_tc_pt2]
type: integer type: integer