mirror of
https://github.com/LCPQ/quantum_package
synced 2024-07-03 18:05:59 +02:00
Merge branch 'master' of github.com:scemama/quantum_package
This commit is contained in:
commit
7ddeb37e92
|
@ -70,16 +70,7 @@ let bind_socket ~socket_type ~socket ~port =
|
||||||
with
|
with
|
||||||
| Unix.Unix_error _ -> (Time.pause @@ Time.Span.of_float 1. ; loop (i-1) )
|
| Unix.Unix_error _ -> (Time.pause @@ Time.Span.of_float 1. ; loop (i-1) )
|
||||||
| other_exception -> raise other_exception
|
| other_exception -> raise other_exception
|
||||||
in loop 60;
|
in loop 60
|
||||||
let filename =
|
|
||||||
Printf.sprintf "/tmp/qp_run:%d" port
|
|
||||||
in
|
|
||||||
begin
|
|
||||||
match Sys.file_exists filename with
|
|
||||||
| `Yes -> Sys.remove filename
|
|
||||||
| _ -> ()
|
|
||||||
end;
|
|
||||||
ZMQ.Socket.bind socket ("ipc://"^filename)
|
|
||||||
|
|
||||||
|
|
||||||
let hostname = lazy (
|
let hostname = lazy (
|
||||||
|
@ -133,7 +124,7 @@ let stop ~port =
|
||||||
let req_socket =
|
let req_socket =
|
||||||
ZMQ.Socket.create zmq_context ZMQ.Socket.req
|
ZMQ.Socket.create zmq_context ZMQ.Socket.req
|
||||||
and address =
|
and address =
|
||||||
Printf.sprintf "ipc:///tmp/qp_run:%d" port
|
Printf.sprintf "tcp://localhost:%d" port
|
||||||
in
|
in
|
||||||
ZMQ.Socket.set_linger_period req_socket 1_000_000;
|
ZMQ.Socket.set_linger_period req_socket 1_000_000;
|
||||||
ZMQ.Socket.connect req_socket address;
|
ZMQ.Socket.connect req_socket address;
|
||||||
|
|
|
@ -147,7 +147,7 @@ program fci_zmq
|
||||||
print *, 'E+PT2 = ', E_CI_before(k)+pt2(k)
|
print *, 'E+PT2 = ', E_CI_before(k)+pt2(k)
|
||||||
print *, '-----'
|
print *, '-----'
|
||||||
enddo
|
enddo
|
||||||
call ezfio_set_full_ci_zmq_energy(CI_energy(1))
|
call ezfio_set_full_ci_zmq_energy(E_CI_before(1))
|
||||||
call ezfio_set_full_ci_zmq_energy_pt2(E_CI_before(1)+pt2(1))
|
call ezfio_set_full_ci_zmq_energy_pt2(E_CI_before(1)+pt2(1))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ subroutine sort_selection_buffer(b)
|
||||||
|
|
||||||
|
|
||||||
allocate(iorder(b%cur), detmp(N_int, 2, size(b%det,3)), absval(b%cur), vals(size(b%val)))
|
allocate(iorder(b%cur), detmp(N_int, 2, size(b%det,3)), absval(b%cur), vals(size(b%val)))
|
||||||
absval = -dabs(b%val(:b%cur))
|
absval = b%val(:b%cur)
|
||||||
do i=1,b%cur
|
do i=1,b%cur
|
||||||
iorder(i) = i
|
iorder(i) = i
|
||||||
end do
|
end do
|
||||||
|
|
|
@ -202,11 +202,11 @@ BEGIN_TEMPLATE
|
||||||
if (isize < 2) then
|
if (isize < 2) then
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
call sorted_$Xnumber(x,isize,n)
|
! call sorted_$Xnumber(x,isize,n)
|
||||||
if (isize == n) then
|
! if (isize == n) then
|
||||||
return
|
! return
|
||||||
endif
|
! endif
|
||||||
if ( isize < 32+n) then
|
if ( isize < 16) then
|
||||||
call insertion_$Xsort(x,iorder,isize)
|
call insertion_$Xsort(x,iorder,isize)
|
||||||
else
|
else
|
||||||
call heap_$Xsort(x,iorder,isize)
|
call heap_$Xsort(x,iorder,isize)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user