mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
Fixed writing MOs for large sizes'
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
e82220a6a4
commit
a2c4a74d92
@ -339,8 +339,16 @@ BEGIN_PROVIDER [ integer, cholesky_ao_num ]
|
|||||||
call omp_destroy_lock(lock(k))
|
call omp_destroy_lock(lock(k))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
allocate(cholesky_ao(ao_num,ao_num,rank))
|
allocate(cholesky_ao(ao_num,ao_num,rank), stat=ierr)
|
||||||
call dcopy(ndim*rank, L, 1, cholesky_ao, 1)
|
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)
|
deallocate(L)
|
||||||
cholesky_ao_num = rank
|
cholesky_ao_num = rank
|
||||||
|
|
||||||
|
@ -26,9 +26,13 @@ BEGIN_PROVIDER [ double precision, cholesky_mo_transp, (cholesky_ao_num, mo_num,
|
|||||||
END_DOC
|
END_DOC
|
||||||
|
|
||||||
double precision, allocatable :: X(:,:,:)
|
double precision, allocatable :: X(:,:,:)
|
||||||
|
integer :: ierr
|
||||||
print *, 'AO->MO Transformation of Cholesky vectors'
|
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, &
|
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)
|
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, &
|
call dgemm('T','N', cholesky_ao_num*mo_num, mo_num, ao_num, 1.d0, &
|
||||||
|
@ -90,6 +90,10 @@ subroutine four_idx_dgemm
|
|||||||
double precision, allocatable :: a1(:,:,:,:)
|
double precision, allocatable :: a1(:,:,:,:)
|
||||||
double precision, allocatable :: a2(:,:,:,:)
|
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))
|
allocate (a1(ao_num,ao_num,ao_num,ao_num))
|
||||||
|
|
||||||
print *, 'Getting AOs'
|
print *, 'Getting AOs'
|
||||||
@ -103,6 +107,7 @@ subroutine four_idx_dgemm
|
|||||||
enddo
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
|
|
||||||
print *, '1st transformation'
|
print *, '1st transformation'
|
||||||
! 1st transformation
|
! 1st transformation
|
||||||
allocate (a2(ao_num,ao_num,ao_num,mo_num))
|
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 :: i,j,k,l,m
|
||||||
integer :: size_buffer, n_integrals
|
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(:,:,:)
|
double precision, allocatable :: Vtmp(:,:,:)
|
||||||
integer(key_kind) , allocatable :: buffer_i(:)
|
integer(key_kind) , allocatable :: buffer_i(:)
|
||||||
@ -575,6 +580,9 @@ subroutine add_integrals_to_map_three_indices(mask_ijk)
|
|||||||
return
|
return
|
||||||
endif
|
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)
|
size_buffer = min(ao_num*ao_num*ao_num,16000000)
|
||||||
print*, 'Providing the molecular integrals '
|
print*, 'Providing the molecular integrals '
|
||||||
print*, 'Buffers : ', 8.*(mo_num*(n_j)*(n_k+1) + mo_num+&
|
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,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 )
|
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)
|
size_buffer = min(ao_num*ao_num*ao_num,16000000)
|
||||||
print*, 'Providing the molecular integrals '
|
print*, 'Providing the molecular integrals '
|
||||||
print*, 'Buffers : ', 8.*(mo_num*(n_j)*(n_k+1) + mo_num+&
|
print*, 'Buffers : ', 8.*(mo_num*(n_j)*(n_k+1) + mo_num+&
|
||||||
|
@ -11,6 +11,10 @@ subroutine map_save_to_disk(filename,map)
|
|||||||
|
|
||||||
integer*8 :: n_elements
|
integer*8 :: n_elements
|
||||||
n_elements = int(map % n_elements,8)
|
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
|
if (map % consolidated) then
|
||||||
|
@ -52,7 +52,6 @@ module mmap_module
|
|||||||
do i=1,size(shape)
|
do i=1,size(shape)
|
||||||
length = length * shape(i)
|
length = length * shape(i)
|
||||||
enddo
|
enddo
|
||||||
print *, 'map_length: ', length
|
|
||||||
|
|
||||||
if (read_only) then
|
if (read_only) then
|
||||||
map = c_mmap_fortran( trim(filename)//char(0), length, fd_, 1)
|
map = c_mmap_fortran( trim(filename)//char(0), length, fd_, 1)
|
||||||
@ -79,7 +78,6 @@ print *, 'map_length: ', length
|
|||||||
do i=1,size(shape)
|
do i=1,size(shape)
|
||||||
length = length * shape(i)
|
length = length * shape(i)
|
||||||
enddo
|
enddo
|
||||||
print *, 'map_length: ', length
|
|
||||||
fd_ = fd
|
fd_ = fd
|
||||||
call c_munmap_fortran( length, fd_, map)
|
call c_munmap_fortran( length, fd_, map)
|
||||||
end subroutine
|
end subroutine
|
||||||
@ -101,7 +99,6 @@ print *, 'map_length: ', length
|
|||||||
do i=1,size(shape)
|
do i=1,size(shape)
|
||||||
length = length * shape(i)
|
length = length * shape(i)
|
||||||
enddo
|
enddo
|
||||||
print *, 'map_length: ', length
|
|
||||||
fd_ = fd
|
fd_ = fd
|
||||||
call c_msync_fortran( length, fd_, map)
|
call c_msync_fortran( length, fd_, map)
|
||||||
end subroutine
|
end subroutine
|
||||||
|
Loading…
Reference in New Issue
Block a user