9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-11 22:23:31 +01:00

Fixed writing MOs for large sizes'
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Anthony Scemama 2023-07-06 16:21:37 +02:00
parent e82220a6a4
commit a2c4a74d92
5 changed files with 31 additions and 7 deletions

View File

@ -339,8 +339,16 @@ BEGIN_PROVIDER [ integer, cholesky_ao_num ]
call omp_destroy_lock(lock(k))
enddo
allocate(cholesky_ao(ao_num,ao_num,rank))
call dcopy(ndim*rank, L, 1, cholesky_ao, 1)
allocate(cholesky_ao(ao_num,ao_num,rank), stat=ierr)
if (ierr /= 0) then
print *, irp_here, ': Allocation failed'
stop -1
endif
!$OMP PARALLEL DO PRIVATE(k)
do k=1,rank
call dcopy(ndim, L(1,k), 1, cholesky_ao(1,1,k), 1)
enddo
!$OMP END PARALLEL DO
deallocate(L)
cholesky_ao_num = rank

View File

@ -26,9 +26,13 @@ BEGIN_PROVIDER [ double precision, cholesky_mo_transp, (cholesky_ao_num, mo_num,
END_DOC
double precision, allocatable :: X(:,:,:)
integer :: ierr
print *, 'AO->MO Transformation of Cholesky vectors'
allocate(X(mo_num,cholesky_ao_num,ao_num))
allocate(X(mo_num,cholesky_ao_num,ao_num), stat=ierr)
if (ierr /= 0) then
print *, irp_here, ': Allocation failed'
endif
call dgemm('T','N', ao_num*cholesky_ao_num, mo_num, ao_num, 1.d0, &
cholesky_ao, ao_num, mo_coef, ao_num, 0.d0, X, ao_num*cholesky_ao_num)
call dgemm('T','N', cholesky_ao_num*mo_num, mo_num, ao_num, 1.d0, &

View File

@ -90,6 +90,10 @@ subroutine four_idx_dgemm
double precision, allocatable :: a1(:,:,:,:)
double precision, allocatable :: a2(:,:,:,:)
if (ao_num > 1289) then
print *, irp_here, ': Integer overflow in ao_num**3'
endif
allocate (a1(ao_num,ao_num,ao_num,ao_num))
print *, 'Getting AOs'
@ -103,6 +107,7 @@ subroutine four_idx_dgemm
enddo
!$OMP END PARALLEL DO
print *, '1st transformation'
! 1st transformation
allocate (a2(ao_num,ao_num,ao_num,mo_num))
@ -456,7 +461,7 @@ subroutine add_integrals_to_map_cholesky
integer :: i,j,k,l,m
integer :: size_buffer, n_integrals
size_buffer = min(mo_num*mo_num,16000000)
size_buffer = min(mo_num*mo_num*mo_num,16000000)
double precision, allocatable :: Vtmp(:,:,:)
integer(key_kind) , allocatable :: buffer_i(:)
@ -575,6 +580,9 @@ subroutine add_integrals_to_map_three_indices(mask_ijk)
return
endif
if (ao_num > 1289) then
print *, irp_here, ': Integer overflow in ao_num**3'
endif
size_buffer = min(ao_num*ao_num*ao_num,16000000)
print*, 'Providing the molecular integrals '
print*, 'Buffers : ', 8.*(mo_num*(n_j)*(n_k+1) + mo_num+&
@ -850,6 +858,9 @@ subroutine add_integrals_to_map_no_exit_34(mask_ijkl)
call bitstring_to_list( mask_ijkl(1,3), list_ijkl(1,3), n_k, N_int )
call bitstring_to_list( mask_ijkl(1,4), list_ijkl(1,4), n_l, N_int )
if (ao_num > 1289) then
print *, irp_here, ': Integer overflow in ao_num**3'
endif
size_buffer = min(ao_num*ao_num*ao_num,16000000)
print*, 'Providing the molecular integrals '
print*, 'Buffers : ', 8.*(mo_num*(n_j)*(n_k+1) + mo_num+&

View File

@ -11,6 +11,10 @@ subroutine map_save_to_disk(filename,map)
integer*8 :: n_elements
n_elements = int(map % n_elements,8)
if (n_elements <= 0) then
print *, 'Unable to write map to disk: n_elements = ', n_elements
stop -1
endif
if (map % consolidated) then

View File

@ -52,7 +52,6 @@ module mmap_module
do i=1,size(shape)
length = length * shape(i)
enddo
print *, 'map_length: ', length
if (read_only) then
map = c_mmap_fortran( trim(filename)//char(0), length, fd_, 1)
@ -79,7 +78,6 @@ print *, 'map_length: ', length
do i=1,size(shape)
length = length * shape(i)
enddo
print *, 'map_length: ', length
fd_ = fd
call c_munmap_fortran( length, fd_, map)
end subroutine
@ -101,7 +99,6 @@ print *, 'map_length: ', length
do i=1,size(shape)
length = length * shape(i)
enddo
print *, 'map_length: ', length
fd_ = fd
call c_msync_fortran( length, fd_, map)
end subroutine