mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-09 06:53:38 +01:00
Compare commits
No commits in common. "bf96d8c0c898cdffab2423eb39e470924659d960" and "4f7eefccfd95bd67729702edadd774be7a89b60b" have entirely different histories.
bf96d8c0c8
...
4f7eefccfd
1
REPLACE
1
REPLACE
@ -834,4 +834,3 @@ qp_name potential_sr_c_alpha_ao_pbe --rename=potential_c_alpha_ao_sr_pbe
|
|||||||
qp_name potential_sr_c_beta_ao_pbe --rename=potential_c_beta_ao_sr_pbe
|
qp_name potential_sr_c_beta_ao_pbe --rename=potential_c_beta_ao_sr_pbe
|
||||||
qp_name potential_sr_xc_alpha_ao_pbe --rename=potential_xc_alpha_ao_sr_pbe
|
qp_name potential_sr_xc_alpha_ao_pbe --rename=potential_xc_alpha_ao_sr_pbe
|
||||||
qp_name potential_sr_xc_beta_ao_pbe --rename=potential_xc_beta_ao_sr_pbe
|
qp_name potential_sr_xc_beta_ao_pbe --rename=potential_xc_beta_ao_sr_pbe
|
||||||
qp_name disk_access_nuclear_repulsion --rename=io_nuclear_repulsion
|
|
||||||
|
@ -1,14 +1,4 @@
|
|||||||
%%% ARXIV TO BE UPDATED %%%
|
%%% ARXIV TO BE UPDATED %%%
|
||||||
@article{Giner2019Jul,
|
|
||||||
author = {Giner, Emmanuel and Scemama, Anthony and Toulouse, Julien and Loos, Pierre-Fran{\ifmmode\mbox{\c{c}}\else\c{c}\fi}ois},
|
|
||||||
title = {{Chemically Accurate Excitation Energies With Small Basis Sets}},
|
|
||||||
journal = {arXiv},
|
|
||||||
year = {2019},
|
|
||||||
month = {Jul},
|
|
||||||
eprint = {1907.01245},
|
|
||||||
url = {https://arxiv.org/abs/1907.01245}
|
|
||||||
}
|
|
||||||
|
|
||||||
@article{Dash2019May,
|
@article{Dash2019May,
|
||||||
author = {Dash, Monika and Feldt, Jonas and Moroni, Saverio and Scemama, Anthony and Filippi, Claudia},
|
author = {Dash, Monika and Feldt, Jonas and Moroni, Saverio and Scemama, Anthony and Filippi, Claudia},
|
||||||
title = {{Excited states with selected CI-QMC: chemically accurate excitation energies and geometries}},
|
title = {{Excited states with selected CI-QMC: chemically accurate excitation energies and geometries}},
|
||||||
|
@ -6,8 +6,9 @@ All the one-electron integrals in the |AO| basis are here.
|
|||||||
|
|
||||||
The most important providers for usual quantum-chemistry calculation are:
|
The most important providers for usual quantum-chemistry calculation are:
|
||||||
|
|
||||||
* `ao_kinetic_integrals` which are the kinetic operator integrals on the |AO| basis
|
* `ao_kinetic_integral` which are the kinetic operator integrals on the |AO| basis (see :file:`kin_ao_ints.irp.f`)
|
||||||
* `ao_integrals_n_e` which are the nuclear-elctron operator integrals on the |AO| basis
|
* `ao_nucl_elec_integral` which are the nuclear-elctron operator integrals on the |AO| basis (see :file:`pot_ao_ints.irp.f`)
|
||||||
* `ao_one_e_integrals` which are the the h_core operator integrals on the |AO| basis
|
* `ao_one_e_integrals` which are the the h_core operator integrals on the |AO| basis (see :file:`ao_mono_ints.irp.f`)
|
||||||
|
|
||||||
|
|
||||||
|
Note that you can find other interesting integrals related to the position operator in :file:`spread_dipole_ao.irp.f`.
|
||||||
|
@ -148,7 +148,7 @@ subroutine run_pt2_slave_small(thread,iproc,energy)
|
|||||||
integer, external :: disconnect_from_taskserver
|
integer, external :: disconnect_from_taskserver
|
||||||
do i=1,300
|
do i=1,300
|
||||||
if (disconnect_from_taskserver(zmq_to_qp_run_socket,worker_id) /= -2) exit
|
if (disconnect_from_taskserver(zmq_to_qp_run_socket,worker_id) /= -2) exit
|
||||||
call usleep(500)
|
call sleep(1)
|
||||||
print *, 'Retry disconnect...'
|
print *, 'Retry disconnect...'
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ subroutine run_selection_slave(thread,iproc,energy)
|
|||||||
if(done .or. ctask == size(task_id)) then
|
if(done .or. ctask == size(task_id)) then
|
||||||
do i=1, ctask
|
do i=1, ctask
|
||||||
if (task_done_to_taskserver(zmq_to_qp_run_socket,worker_id,task_id(i)) == -1) then
|
if (task_done_to_taskserver(zmq_to_qp_run_socket,worker_id,task_id(i)) == -1) then
|
||||||
call usleep(100)
|
call sleep(1)
|
||||||
if (task_done_to_taskserver(zmq_to_qp_run_socket,worker_id,task_id(i)) == -1) then
|
if (task_done_to_taskserver(zmq_to_qp_run_socket,worker_id,task_id(i)) == -1) then
|
||||||
ctask = 0
|
ctask = 0
|
||||||
done = .true.
|
done = .true.
|
||||||
@ -85,7 +85,6 @@ subroutine run_selection_slave(thread,iproc,energy)
|
|||||||
if(ctask > 0) then
|
if(ctask > 0) then
|
||||||
call sort_selection_buffer(buf)
|
call sort_selection_buffer(buf)
|
||||||
! call merge_selection_buffers(buf,buf2)
|
! call merge_selection_buffers(buf,buf2)
|
||||||
print *, task_id(1), pt2(1), buf%cur, ctask
|
|
||||||
call push_selection_results(zmq_socket_push, pt2, variance, norm, buf, task_id(1), ctask)
|
call push_selection_results(zmq_socket_push, pt2, variance, norm, buf, task_id(1), ctask)
|
||||||
! buf%mini = buf2%mini
|
! buf%mini = buf2%mini
|
||||||
pt2(:) = 0d0
|
pt2(:) = 0d0
|
||||||
@ -133,6 +132,7 @@ subroutine push_selection_results(zmq_socket_push, pt2, variance, norm, b, task_
|
|||||||
print *, 'f77_zmq_send( zmq_socket_push, b%cur, 4, ZMQ_SNDMORE)'
|
print *, 'f77_zmq_send( zmq_socket_push, b%cur, 4, ZMQ_SNDMORE)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if (b%cur > 0) then
|
||||||
|
|
||||||
rc = f77_zmq_send( zmq_socket_push, pt2, 8*N_states, ZMQ_SNDMORE)
|
rc = f77_zmq_send( zmq_socket_push, pt2, 8*N_states, ZMQ_SNDMORE)
|
||||||
if(rc /= 8*N_states) then
|
if(rc /= 8*N_states) then
|
||||||
@ -149,8 +149,6 @@ subroutine push_selection_results(zmq_socket_push, pt2, variance, norm, b, task_
|
|||||||
print *, 'f77_zmq_send( zmq_socket_push, norm, 8*N_states, ZMQ_SNDMORE)'
|
print *, 'f77_zmq_send( zmq_socket_push, norm, 8*N_states, ZMQ_SNDMORE)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (b%cur > 0) then
|
|
||||||
|
|
||||||
rc = f77_zmq_send( zmq_socket_push, b%val(1), 8*b%cur, ZMQ_SNDMORE)
|
rc = f77_zmq_send( zmq_socket_push, b%val(1), 8*b%cur, ZMQ_SNDMORE)
|
||||||
if(rc /= 8*b%cur) then
|
if(rc /= 8*b%cur) then
|
||||||
print *, 'f77_zmq_send( zmq_socket_push, b%val(1), 8*b%cur, ZMQ_SNDMORE)'
|
print *, 'f77_zmq_send( zmq_socket_push, b%val(1), 8*b%cur, ZMQ_SNDMORE)'
|
||||||
@ -205,10 +203,7 @@ subroutine pull_selection_results(zmq_socket_pull, pt2, variance, norm, val, det
|
|||||||
print *, 'f77_zmq_recv( zmq_socket_pull, N, 4, 0)'
|
print *, 'f77_zmq_recv( zmq_socket_pull, N, 4, 0)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
pt2(:) = 0.d0
|
if (N>0) then
|
||||||
variance(:) = 0.d0
|
|
||||||
norm(:) = 0.d0
|
|
||||||
|
|
||||||
rc = f77_zmq_recv( zmq_socket_pull, pt2, N_states*8, 0)
|
rc = f77_zmq_recv( zmq_socket_pull, pt2, N_states*8, 0)
|
||||||
if(rc /= 8*N_states) then
|
if(rc /= 8*N_states) then
|
||||||
print *, 'f77_zmq_recv( zmq_socket_pull, pt2, N_states*8, 0)'
|
print *, 'f77_zmq_recv( zmq_socket_pull, pt2, N_states*8, 0)'
|
||||||
@ -224,7 +219,6 @@ subroutine pull_selection_results(zmq_socket_pull, pt2, variance, norm, val, det
|
|||||||
print *, 'f77_zmq_recv( zmq_socket_pull, norm, N_states*8, 0)'
|
print *, 'f77_zmq_recv( zmq_socket_pull, norm, N_states*8, 0)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (N>0) then
|
|
||||||
rc = f77_zmq_recv( zmq_socket_pull, val(1), 8*N, 0)
|
rc = f77_zmq_recv( zmq_socket_pull, val(1), 8*N, 0)
|
||||||
if(rc /= 8*N) then
|
if(rc /= 8*N) then
|
||||||
print *, 'f77_zmq_recv( zmq_socket_pull, val(1), 8*N, 0)'
|
print *, 'f77_zmq_recv( zmq_socket_pull, val(1), 8*N, 0)'
|
||||||
@ -234,6 +228,10 @@ subroutine pull_selection_results(zmq_socket_pull, pt2, variance, norm, val, det
|
|||||||
if(rc /= bit_kind*N_int*2*N) then
|
if(rc /= bit_kind*N_int*2*N) then
|
||||||
print *, 'f77_zmq_recv( zmq_socket_pull, det(1,1,1), bit_kind*N_int*2*N, 0)'
|
print *, 'f77_zmq_recv( zmq_socket_pull, det(1,1,1), bit_kind*N_int*2*N, 0)'
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
pt2(:) = 0.d0
|
||||||
|
variance(:) = 0.d0
|
||||||
|
norm(:) = 0.d0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_recv( zmq_socket_pull, ntask, 4, 0)
|
rc = f77_zmq_recv( zmq_socket_pull, ntask, 4, 0)
|
||||||
|
@ -63,7 +63,7 @@ subroutine run_slave_main
|
|||||||
if (mpi_master) then
|
if (mpi_master) then
|
||||||
call wait_for_states(states,zmq_state,size(states))
|
call wait_for_states(states,zmq_state,size(states))
|
||||||
if (zmq_state(1:64) == old_state(1:64)) then
|
if (zmq_state(1:64) == old_state(1:64)) then
|
||||||
call usleep(200)
|
call sleep(1)
|
||||||
cycle
|
cycle
|
||||||
else
|
else
|
||||||
old_state(1:64) = zmq_state(1:64)
|
old_state(1:64) = zmq_state(1:64)
|
||||||
|
@ -39,8 +39,6 @@ BEGIN_PROVIDER [ character*(128), ezfio_filename ]
|
|||||||
write(command,*) 'echo 15 > /proc//'//trim(adjustl(pidc))//'/oom_adj'
|
write(command,*) 'echo 15 > /proc//'//trim(adjustl(pidc))//'/oom_adj'
|
||||||
call system(command)
|
call system(command)
|
||||||
|
|
||||||
PROVIDE file_lock
|
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [ character*(128), ezfio_work_dir ]
|
BEGIN_PROVIDER [ character*(128), ezfio_work_dir ]
|
||||||
|
@ -43,13 +43,8 @@ subroutine run
|
|||||||
E_CI_before(:) = psi_energy(:) + nuclear_repulsion
|
E_CI_before(:) = psi_energy(:) + nuclear_repulsion
|
||||||
relative_error=PT2_relative_error
|
relative_error=PT2_relative_error
|
||||||
|
|
||||||
if (do_pt2) then
|
|
||||||
call ZMQ_pt2(psi_energy_with_nucl_rep,pt2,relative_error,error, variance, &
|
call ZMQ_pt2(psi_energy_with_nucl_rep,pt2,relative_error,error, variance, &
|
||||||
norm,0) ! Stochastic PT2
|
norm,0) ! Stochastic PT2
|
||||||
else
|
|
||||||
call ZMQ_selection(0, pt2, variance, norm)
|
|
||||||
endif
|
|
||||||
|
|
||||||
do k=1,N_states
|
do k=1,N_states
|
||||||
rpt2(k) = pt2(k)/(1.d0 + norm(k))
|
rpt2(k) = pt2(k)/(1.d0 + norm(k))
|
||||||
enddo
|
enddo
|
||||||
|
@ -21,7 +21,7 @@ type: double precision
|
|||||||
size: (nuclei.nucl_num,3)
|
size: (nuclei.nucl_num,3)
|
||||||
interface: ezfio
|
interface: ezfio
|
||||||
|
|
||||||
[io_nuclear_repulsion]
|
[disk_access_nuclear_repulsion]
|
||||||
doc: Read/Write Nuclear Repulsion from/to disk [ Write | Read | None ]
|
doc: Read/Write Nuclear Repulsion from/to disk [ Write | Read | None ]
|
||||||
type: Disk_access
|
type: Disk_access
|
||||||
interface: ezfio,provider,ocaml
|
interface: ezfio,provider,ocaml
|
||||||
|
@ -143,7 +143,7 @@ BEGIN_PROVIDER [ double precision, nuclear_repulsion ]
|
|||||||
END_DOC
|
END_DOC
|
||||||
|
|
||||||
PROVIDE mpi_master nucl_coord nucl_charge nucl_num
|
PROVIDE mpi_master nucl_coord nucl_charge nucl_num
|
||||||
if (io_nuclear_repulsion == 'Read') then
|
if (disk_access_nuclear_repulsion.EQ.'Read') then
|
||||||
logical :: has
|
logical :: has
|
||||||
|
|
||||||
if (mpi_master) then
|
if (mpi_master) then
|
||||||
@ -194,7 +194,7 @@ BEGIN_PROVIDER [ double precision, nuclear_repulsion ]
|
|||||||
call write_time(6)
|
call write_time(6)
|
||||||
call write_double(6,nuclear_repulsion,'Nuclear repulsion energy')
|
call write_double(6,nuclear_repulsion,'Nuclear repulsion energy')
|
||||||
|
|
||||||
if (io_nuclear_repulsion == 'Write') then
|
if (disk_access_nuclear_repulsion.EQ.'Write') then
|
||||||
if (mpi_master) then
|
if (mpi_master) then
|
||||||
call ezfio_set_nuclei_nuclear_repulsion(nuclear_repulsion)
|
call ezfio_set_nuclei_nuclear_repulsion(nuclear_repulsion)
|
||||||
endif
|
endif
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
module c_functions
|
|
||||||
use iso_c_binding
|
|
||||||
|
|
||||||
interface
|
|
||||||
subroutine usleep_c(us) bind (C,name="usleep")
|
|
||||||
use iso_c_binding
|
|
||||||
integer(c_int), value :: us
|
|
||||||
end subroutine usleep_c
|
|
||||||
end interface
|
|
||||||
|
|
||||||
end module
|
|
||||||
|
|
||||||
subroutine usleep(us)
|
|
||||||
use c_functions
|
|
||||||
use iso_c_binding
|
|
||||||
implicit none
|
|
||||||
integer, intent(in) :: us
|
|
||||||
call usleep_c(int(us,c_int))
|
|
||||||
end
|
|
@ -15,7 +15,6 @@ BEGIN_PROVIDER [ integer, qp_max_mem ]
|
|||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
subroutine resident_memory(value)
|
subroutine resident_memory(value)
|
||||||
use c_functions
|
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Returns the current used memory in gigabytes used by the current process.
|
! Returns the current used memory in gigabytes used by the current process.
|
||||||
@ -26,8 +25,6 @@ subroutine resident_memory(value)
|
|||||||
double precision, intent(out) :: value
|
double precision, intent(out) :: value
|
||||||
|
|
||||||
call omp_set_lock(file_lock)
|
call omp_set_lock(file_lock)
|
||||||
call usleep(10)
|
|
||||||
|
|
||||||
value = 0.d0
|
value = 0.d0
|
||||||
iunit = getUnitAndOpen('/proc/self/status','r')
|
iunit = getUnitAndOpen('/proc/self/status','r')
|
||||||
do
|
do
|
||||||
|
@ -275,6 +275,7 @@ IRP_ENDIF
|
|||||||
rc = f77_zmq_bind(new_zmq_pull_socket, zmq_socket_pull_tcp_address)
|
rc = f77_zmq_bind(new_zmq_pull_socket, zmq_socket_pull_tcp_address)
|
||||||
if (rc /= 0) then
|
if (rc /= 0) then
|
||||||
icount = icount-1
|
icount = icount-1
|
||||||
|
! call sleep(3)
|
||||||
zmq_socket_pull_tcp_address = 'tcp://*:'//zmq_port(2+icount*100)//' '
|
zmq_socket_pull_tcp_address = 'tcp://*:'//zmq_port(2+icount*100)//' '
|
||||||
zmq_socket_push_tcp_address = trim(qp_run_address)//':'//zmq_port(2+icount*100)//' '
|
zmq_socket_push_tcp_address = trim(qp_run_address)//':'//zmq_port(2+icount*100)//' '
|
||||||
else
|
else
|
||||||
@ -751,8 +752,7 @@ integer function add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
|||||||
|
|
||||||
add_task_to_taskserver = 0
|
add_task_to_taskserver = 0
|
||||||
|
|
||||||
sze = len(trim(task)) + len(trim(zmq_state))+11
|
allocate(character(len=len(task)+10+len(zmq_state)) :: message)
|
||||||
allocate(character(len=sze) :: message)
|
|
||||||
message='add_task '//trim(zmq_state)//' '//trim(task)
|
message='add_task '//trim(zmq_state)//' '//trim(task)
|
||||||
sze = len(message)
|
sze = len(message)
|
||||||
rc = f77_zmq_send(zmq_to_qp_run_socket, message, sze, 0)
|
rc = f77_zmq_send(zmq_to_qp_run_socket, message, sze, 0)
|
||||||
@ -768,7 +768,6 @@ integer function add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
|||||||
add_task_to_taskserver = -1
|
add_task_to_taskserver = -1
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
deallocate(message)
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user