10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00

Merge pull request #224 from scemama/master

Fixes  #223
This commit is contained in:
Thomas Applencourt 2018-01-12 16:35:12 -06:00 committed by GitHub
commit b903b9905b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 108 deletions

View File

@ -1 +0,0 @@
Determinants

View File

@ -1,14 +0,0 @@
=====
GASPI
=====
Providers for GASPI programs (with the GPI2 library).
Needed Modules
==============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
Documentation
=============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.

View File

@ -1,13 +0,0 @@
program test
double precision :: energy(N_states)
if (is_gaspi_master) then
energy = 1.d0
else
energy = 0.d0
endif
call broadcast_wf(energy)
print *, 'energy (1.d0) :', GASPI_rank, energy(1)
print *, 'coef :', GASPI_rank, psi_coef(1,1)
print *, 'det :', GASPI_rank, psi_det (1,1,1)
call gaspi_finalize
end

View File

@ -1,76 +0,0 @@
BEGIN_PROVIDER [ logical, GASPI_is_initialized ]
&BEGIN_PROVIDER [ logical, has_gaspi ]
implicit none
BEGIN_DOC
! This is true when GASPI_Init has been called
END_DOC
has_gaspi = .False.
IRP_IF GASPI
use GASPI
integer(gaspi_return_t) :: res
res = gaspi_proc_init(GASPI_BLOCK)
if (res /= GASPI_SUCCESS) then
print *, res
print *, 'GASPI failed to initialize'
stop -1
endif
has_gaspi = .True.
IRP_ENDIF
GASPI_is_initialized = .True.
END_PROVIDER
BEGIN_PROVIDER [ integer, GASPI_rank ]
&BEGIN_PROVIDER [ integer, GASPI_size ]
&BEGIN_PROVIDER [ logical, is_GASPI_master ]
implicit none
BEGIN_DOC
! Usual GASPI variables
END_DOC
PROVIDE GASPI_is_initialized
IRP_IF GASPI
use GASPI
integer(gaspi_return_t) :: res
integer(gaspi_rank_t) :: n
res = gaspi_proc_num(n)
GASPI_size = n
if (res /= GASPI_SUCCESS) then
print *, res
print *, 'Unable to get GASPI_size'
stop -1
endif
res = gaspi_proc_rank(n)
GASPI_rank = n
if (res /= GASPI_SUCCESS) then
print *, res
print *, 'Unable to get GASPI_rank'
stop -1
endif
is_GASPI_master = (GASPI_rank == 0)
IRP_ELSE
GASPI_rank = 0
GASPI_size = 1
is_GASPI_master = .True.
IRP_ENDIF
END_PROVIDER
subroutine gaspi_finalize()
implicit none
PROVIDE GASPI_is_initialized
IRP_IF GASPI
use GASPI
integer(gaspi_return_t) :: res
res = gaspi_proc_term(GASPI_BLOCK)
if (res /= GASPI_SUCCESS) then
print *, res
print *, 'Unable to finalize GASPI'
stop -1
endif
IRP_ENDIF
end subroutine

View File

@ -45,13 +45,13 @@ program print_integrals
do k=1,mo_tot_num do k=1,mo_tot_num
do j=l,mo_tot_num do j=l,mo_tot_num
do i=k,mo_tot_num do i=k,mo_tot_num
!if (i>=j) then if (i>=j) then
double precision :: get_mo_bielec_integral double precision :: get_mo_bielec_integral
integral = get_mo_bielec_integral(i,j,k,l,mo_integrals_map) integral = get_mo_bielec_integral(i,j,k,l,mo_integrals_map)
if (dabs(integral) > mo_integrals_threshold) then if (dabs(integral) > mo_integrals_threshold) then
write (iunit,'(4(I6,X),F20.15)') i,j,k,l, integral write (iunit,'(4(I6,X),E25.15)') i,j,k,l, integral
endif
end if end if
!end if
enddo enddo
enddo enddo
enddo enddo

View File

@ -69,9 +69,10 @@ subroutine run
13 continue 13 continue
close(iunit) close(iunit)
call insert_into_mo_integrals_map(n_integrals,buffer_i,buffer_values,0.d0) call map_append(mo_integrals_map, buffer_i, buffer_values, n_integrals)
call map_sort(mo_integrals_map) call map_sort(mo_integrals_map)
call map_unique(mo_integrals_map)
call map_save_to_disk(trim(ezfio_filename)//'/work/mo_ints',mo_integrals_map) call map_save_to_disk(trim(ezfio_filename)//'/work/mo_ints',mo_integrals_map)
call ezfio_set_integrals_bielec_disk_access_mo_integrals("Read") call ezfio_set_integrals_bielec_disk_access_mo_integrals("Read")