diff --git a/src/Dets/H_apply_template.f b/src/Dets/H_apply_template.f index 39f85033..27afc8e5 100644 --- a/src/Dets/H_apply_template.f +++ b/src/Dets/H_apply_template.f @@ -31,10 +31,9 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene integer :: iproc integer(omp_lock_kind), save :: lck, ifirst=0 if (ifirst == 0) then - ifirst=1 !$ call omp_init_lock(lck) + ifirst=1 endif - PROVIDE H_apply_threshold $initialization @@ -279,7 +278,6 @@ subroutine $subroutine_monoexc(key_in, hole_1,particl_1,i_generator $parameters ifirst=1 !$ call omp_init_lock(lck) endif - PROVIDE H_apply_threshold $initialization @@ -383,7 +381,7 @@ subroutine $subroutine($params_main) integer :: ispin, k PROVIDE H_apply_buffer_allocated mo_bielec_integrals_in_map N_det_selectors psi_generators - PROVIDE psi_det_sorted_bit coef_hf_selector + PROVIDE psi_det_sorted_bit coef_hf_selector psi_det psi_coef H_apply_threshold nmax = ( N_det_generators/nproc ) *nproc call wall_time(wall_1) diff --git a/src/Dets/determinants.irp.f b/src/Dets/determinants.irp.f index 46249e5f..979386f1 100644 --- a/src/Dets/determinants.irp.f +++ b/src/Dets/determinants.irp.f @@ -55,7 +55,16 @@ BEGIN_PROVIDER [ integer, psi_det_size ] BEGIN_DOC ! Size of the psi_det/psi_coef arrays END_DOC - psi_det_size = 1000*N_states + PROVIDE ezfio_filename + logical :: exists + call ezfio_has_determinants_n_det(exists) + if (exists) then + call ezfio_get_determinants_n_det(psi_det_size) + else + psi_det_size = 1 + endif + psi_det_size = max(psi_det_size,10000) + END_PROVIDER BEGIN_PROVIDER [ integer(bit_kind), psi_det, (N_int,2,psi_det_size) ] @@ -64,13 +73,8 @@ BEGIN_PROVIDER [ integer(bit_kind), psi_det, (N_int,2,psi_det_size) ] ! The wave function determinants. Initialized with Hartree-Fock if the EZFIO file ! is empty END_DOC - integer*8, allocatable :: psi_det_read(:,:,:) - double precision, allocatable :: psi_coef_read(:,:) - integer*8 :: det_8(100) - integer(bit_kind) :: det_bk((100*8)/bit_kind) - integer :: N_int2, i + integer :: i logical :: exists - equivalence (det_8, det_bk) call ezfio_has_determinants_N_int(exists) if (exists) then @@ -80,10 +84,7 @@ BEGIN_PROVIDER [ integer(bit_kind), psi_det, (N_int,2,psi_det_size) ] if (exists) then call ezfio_has_determinants_N_states(exists) if (exists) then - call ezfio_has_determinants_psi_coef(exists) - if (exists) then call ezfio_has_determinants_psi_det(exists) - endif endif endif endif @@ -102,6 +103,7 @@ BEGIN_PROVIDER [ integer(bit_kind), psi_det, (N_int,2,psi_det_size) ] END_PROVIDER subroutine read_dets(det,Nint,Ndet) + use bitmasks implicit none BEGIN_DOC ! Reads the determinants from the EZFIO file @@ -118,24 +120,24 @@ subroutine read_dets(det,Nint,Ndet) equivalence (det_8, det_bk) call ezfio_get_determinants_N_int(N_int2) - ASSERT (N_int2 == N_int) + ASSERT (N_int2 == Nint) call ezfio_get_determinants_bit_kind(k) ASSERT (k == bit_kind) - N_int2 = (N_int*bit_kind)/8 - allocate (psi_det_read(N_int2,2,N_det)) + N_int2 = (Nint*bit_kind)/8 + allocate (psi_det_read(N_int2,2,Ndet)) call ezfio_get_determinants_psi_det (psi_det_read) - do i=1,N_det + do i=1,Ndet do k=1,N_int2 det_8(k) = psi_det_read(k,1,i) enddo - do k=1,N_int + do k=1,Nint det(k,1,i) = det_bk(k) enddo do k=1,N_int2 det_8(k) = psi_det_read(k,2,i) enddo - do k=1,N_int + do k=1,Nint det(k,2,i) = det_bk(k) enddo enddo @@ -176,6 +178,7 @@ BEGIN_PROVIDER [ double precision, psi_coef, (psi_det_size,N_states) ] enddo endif + END_PROVIDER diff --git a/src/Full_CI/README.rst b/src/Full_CI/README.rst index 5f0ae69c..f63f5a06 100644 --- a/src/Full_CI/README.rst +++ b/src/Full_CI/README.rst @@ -10,9 +10,6 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`cisd `_ - Undocumented - Needed Modules