mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
Fixed minor bugs
This commit is contained in:
parent
2454862cb0
commit
be00409eaf
@ -1,6 +1,6 @@
|
||||
open Core.Std;;
|
||||
open Core.Std
|
||||
|
||||
type t = float with sexp;;
|
||||
type t = float with sexp
|
||||
|
||||
let of_float x = x
|
||||
let of_int i = Float.of_int i
|
||||
@ -14,5 +14,4 @@ let to_string x =
|
||||
Printf.sprintf "+%f" x
|
||||
else
|
||||
Printf.sprintf "%f" x
|
||||
;;
|
||||
|
||||
|
@ -22,6 +22,11 @@ let update ~cur_value bar =
|
||||
let increment_end bar =
|
||||
{ bar with end_value=(bar.end_value +. 1.) ; dirty=false }
|
||||
|
||||
let clear bar =
|
||||
Printf.eprintf " \r%!";
|
||||
None
|
||||
|
||||
|
||||
let increment_cur bar =
|
||||
{ bar with cur_value=(bar.cur_value +. 1.) ; dirty=true }
|
||||
|
||||
|
@ -212,7 +212,7 @@ let end_job msg program_state rep_socket pair_socket =
|
||||
reply_ok rep_socket;
|
||||
{ program_state with
|
||||
state = None ;
|
||||
progress_bar = None ;
|
||||
progress_bar = Progress_bar.clear ();
|
||||
}
|
||||
|
||||
in
|
||||
|
@ -128,7 +128,7 @@ program fci_zmq
|
||||
double precision :: relative_error
|
||||
relative_error=1.d-3
|
||||
pt2 = 0.d0
|
||||
if (N_states > 1) then
|
||||
if (N_states == 1) then
|
||||
print *, 'Stochastic PT2'
|
||||
call ZMQ_pt2(E_CI_before(1), pt2,relative_error) ! Stochastic PT2
|
||||
else
|
||||
|
@ -32,7 +32,7 @@ subroutine ZMQ_pt2(E, pt2,relative_error)
|
||||
sum2above = 0d0
|
||||
Nabove = 0d0
|
||||
|
||||
provide nproc fragment_first fragment_count mo_bielec_integrals_in_map mo_mono_elec_integral pt2_weight
|
||||
provide nproc fragment_first fragment_count mo_bielec_integrals_in_map mo_mono_elec_integral pt2_weight psi_selectors
|
||||
|
||||
!call random_seed()
|
||||
|
||||
@ -52,15 +52,13 @@ subroutine ZMQ_pt2(E, pt2,relative_error)
|
||||
print *, '========== ================ ================'
|
||||
do while(.true.)
|
||||
|
||||
call write_time(6)
|
||||
call new_parallel_job(zmq_to_qp_run_socket,"pt2")
|
||||
call new_parallel_job(zmq_to_qp_run_socket,'pt2')
|
||||
call zmq_put_psi(zmq_to_qp_run_socket,1,pt2_e0_denominator,size(pt2_e0_denominator))
|
||||
call create_selection_buffer(1, 1*2, b)
|
||||
|
||||
Ncomb=size(comb)/100
|
||||
call get_carlo_workbatch(computed, comb, Ncomb, tbc)
|
||||
|
||||
call write_time(6)
|
||||
|
||||
|
||||
integer(ZMQ_PTR), external :: new_zmq_to_qp_run_socket
|
||||
@ -123,6 +121,7 @@ subroutine ZMQ_pt2(E, pt2,relative_error)
|
||||
exit
|
||||
endif
|
||||
end do
|
||||
print *, '========== ================ ================'
|
||||
|
||||
deallocate(pt2_detail, comb, computed, tbc)
|
||||
|
||||
@ -232,6 +231,9 @@ subroutine pt2_collector(E, b, tbc, comb, Ncomb, computed, pt2_detail, sumabove,
|
||||
endif
|
||||
timeLast = time0
|
||||
|
||||
call get_first_tooth(actually_computed, tooth)
|
||||
Nabove_old = Nabove(tooth)
|
||||
|
||||
! print *, 'N_deterministic = ', first_det_of_teeth(1)-1
|
||||
pullLoop : do while (more == 1)
|
||||
call pull_pt2_results(zmq_socket_pull, Nindex, index, pt2_mwen, task_id, ntask)
|
||||
@ -288,13 +290,12 @@ subroutine pt2_collector(E, b, tbc, comb, Ncomb, computed, pt2_detail, sumabove,
|
||||
else
|
||||
! print "(4(G22.13), 4(I9))", time - time0, avg, eqt, Nabove(tooth), tooth, first_det_of_teeth(tooth)-1, done, first_det_of_teeth(tooth+1)-first_det_of_teeth(tooth)
|
||||
if (Nabove(tooth) > Nabove_old) then
|
||||
print '(E10.1, X, F16.10, E16.3,A30)', Nabove(tooth), avg+E, eqt, ''
|
||||
print '(G10.3, X, F16.10, G16.3,A30)', Nabove(tooth), avg+E, eqt, ''
|
||||
Nabove_old = Nabove(tooth)
|
||||
endif
|
||||
endif
|
||||
end if
|
||||
end do pullLoop
|
||||
print *, '========== ================ ================'
|
||||
|
||||
call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
|
||||
call end_zmq_pull_socket(zmq_socket_pull)
|
||||
|
@ -37,7 +37,7 @@ subroutine run_wf
|
||||
|
||||
do
|
||||
|
||||
call wait_for_states(states,zmq_state,2)
|
||||
call wait_for_states(states,zmq_state,3)
|
||||
|
||||
if(trim(zmq_state) == 'Stopped') then
|
||||
|
||||
|
@ -359,6 +359,10 @@ BEGIN_TEMPLATE
|
||||
integer :: err
|
||||
!DIR$ ATTRIBUTES ALIGN : 128 :: iorder1,iorder2, x2, x1
|
||||
|
||||
if (isize < 2) then
|
||||
return
|
||||
endif
|
||||
|
||||
if (iradix == -1) then ! Sort Positive and negative
|
||||
|
||||
allocate(x1(isize),iorder1(isize), x2(isize),iorder2(isize),stat=err)
|
||||
|
Loading…
Reference in New Issue
Block a user