mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-25 13:53:49 +01:00
Fixed reading MOs
This commit is contained in:
parent
93744c23c9
commit
8461e74ed0
@ -15,3 +15,9 @@ doc: Maximum number of dressed CI iterations
|
|||||||
interface: ezfio,provider,ocaml
|
interface: ezfio,provider,ocaml
|
||||||
default: 10
|
default: 10
|
||||||
|
|
||||||
|
[h0_type]
|
||||||
|
type: Perturbation
|
||||||
|
doc: Type of zeroth-order Hamiltonian [ EN | Barycentric ]
|
||||||
|
interface: ezfio,provider,ocaml
|
||||||
|
default: EN
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ void* mmap_fortran(char* filename, size_t bytes, int* file_descr, int read_only)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
result = lseek(fd, bytes, SEEK_SET);
|
result = lseek(fd, bytes+1, SEEK_SET);
|
||||||
if (result == -1) {
|
if (result == -1) {
|
||||||
close(fd);
|
close(fd);
|
||||||
printf("%s:\n", filename);
|
printf("%s:\n", filename);
|
||||||
|
@ -74,6 +74,8 @@ subroutine map_load_from_disk(filename,map)
|
|||||||
integer :: fd(3)
|
integer :: fd(3)
|
||||||
integer*8 :: i,k,l
|
integer*8 :: i,k,l
|
||||||
integer*4 :: j,n_elements
|
integer*4 :: j,n_elements
|
||||||
|
integer(cache_key_kind), pointer :: key_p(:)
|
||||||
|
real(integral_kind), pointer :: value_p(:)
|
||||||
|
|
||||||
if (map % consolidated) then
|
if (map % consolidated) then
|
||||||
stop 'map already consolidated'
|
stop 'map already consolidated'
|
||||||
@ -96,21 +98,25 @@ subroutine map_load_from_disk(filename,map)
|
|||||||
do i=0_8, map % map_size
|
do i=0_8, map % map_size
|
||||||
deallocate(map % map(i) % value)
|
deallocate(map % map(i) % value)
|
||||||
deallocate(map % map(i) % key)
|
deallocate(map % map(i) % key)
|
||||||
map % map(i) % value => map % consolidated_value ( map % consolidated_idx (i+1_8) :)
|
|
||||||
map % map(i) % key => map % consolidated_key ( map % consolidated_idx (i+1_8) :)
|
|
||||||
map % map(i) % sorted = .True.
|
|
||||||
n_elements = int( map % consolidated_idx (i+2_8) - k, 4)
|
|
||||||
k = map % consolidated_idx (i+2_8)
|
k = map % consolidated_idx (i+2_8)
|
||||||
|
l = map % consolidated_idx (i+1_8)
|
||||||
|
n_elements = int(k - l, 4)
|
||||||
|
key_p => map % consolidated_key (l:l+n_elements)
|
||||||
|
value_p => map % consolidated_value ( l:l+n_elements )
|
||||||
|
print *, i, n_elements
|
||||||
|
map % map(i) % key => key_p
|
||||||
|
map % map(i) % value => value_p
|
||||||
|
map % map(i) % sorted = .True.
|
||||||
map % map(i) % map_size = n_elements
|
map % map(i) % map_size = n_elements
|
||||||
map % map(i) % n_elements = n_elements
|
map % map(i) % n_elements = n_elements
|
||||||
! Load memory from disk
|
! Load memory from disk
|
||||||
do j=1,n_elements
|
do j=1,n_elements
|
||||||
x = x + map % map(i) % value(j)
|
x = x + value_p(j)
|
||||||
l = iand(l,int(map % map(i) % key(j),8))
|
l = iand(l,int(key_p(j),8))
|
||||||
if (map % map(i) % value(j) > 1.e30) then
|
if (value_p(j) > 1.e30) then
|
||||||
stop 'Error in integrals file'
|
stop 'Error in integrals file'
|
||||||
endif
|
endif
|
||||||
if (map % map(i) % key(j) < 0) then
|
if (key_p(j) < 0) then
|
||||||
stop 'Error in integrals file'
|
stop 'Error in integrals file'
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
@ -148,12 +148,12 @@ function new_zmq_to_qp_run_socket()
|
|||||||
stop 'Unable to create zmq req socket'
|
stop 'Unable to create zmq req socket'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_setsockopt(new_zmq_to_qp_run_socket, ZMQ_SNDTIMEO, 30000, 4)
|
rc = f77_zmq_setsockopt(new_zmq_to_qp_run_socket, ZMQ_SNDTIMEO, 60000, 4)
|
||||||
if (rc /= 0) then
|
if (rc /= 0) then
|
||||||
stop 'Unable to set send timeout in new_zmq_to_qp_run_socket'
|
stop 'Unable to set send timeout in new_zmq_to_qp_run_socket'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_setsockopt(new_zmq_to_qp_run_socket, ZMQ_RCVTIMEO, 30000, 4)
|
rc = f77_zmq_setsockopt(new_zmq_to_qp_run_socket, ZMQ_RCVTIMEO, 60000, 4)
|
||||||
if (rc /= 0) then
|
if (rc /= 0) then
|
||||||
stop 'Unable to set recv timeout in new_zmq_to_qp_run_socket'
|
stop 'Unable to set recv timeout in new_zmq_to_qp_run_socket'
|
||||||
endif
|
endif
|
||||||
@ -250,7 +250,7 @@ IRP_ENDIF
|
|||||||
stop 'Unable to create zmq pull socket'
|
stop 'Unable to create zmq pull socket'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_LINGER,30000,4)
|
rc = f77_zmq_setsockopt(new_zmq_pull_socket,ZMQ_LINGER,60000,4)
|
||||||
if (rc /= 0) then
|
if (rc /= 0) then
|
||||||
stop 'Unable to set ZMQ_LINGER on pull socket'
|
stop 'Unable to set ZMQ_LINGER on pull socket'
|
||||||
endif
|
endif
|
||||||
@ -332,7 +332,7 @@ IRP_ENDIF
|
|||||||
stop 'Unable to create zmq push socket'
|
stop 'Unable to create zmq push socket'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_LINGER,30000,4)
|
rc = f77_zmq_setsockopt(new_zmq_push_socket,ZMQ_LINGER,60000,4)
|
||||||
if (rc /= 0) then
|
if (rc /= 0) then
|
||||||
stop 'Unable to set ZMQ_LINGER on push socket'
|
stop 'Unable to set ZMQ_LINGER on push socket'
|
||||||
endif
|
endif
|
||||||
@ -352,7 +352,7 @@ IRP_ENDIF
|
|||||||
stop 'Unable to set ZMQ_IMMEDIATE on push socket'
|
stop 'Unable to set ZMQ_IMMEDIATE on push socket'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_setsockopt(new_zmq_push_socket, ZMQ_SNDTIMEO, 30000, 4)
|
rc = f77_zmq_setsockopt(new_zmq_push_socket, ZMQ_SNDTIMEO, 60000, 4)
|
||||||
if (rc /= 0) then
|
if (rc /= 0) then
|
||||||
stop 'Unable to set send timout in new_zmq_push_socket'
|
stop 'Unable to set send timout in new_zmq_push_socket'
|
||||||
endif
|
endif
|
||||||
@ -488,7 +488,7 @@ subroutine end_zmq_push_socket(zmq_socket_push,thread)
|
|||||||
integer :: rc
|
integer :: rc
|
||||||
character*(8), external :: zmq_port
|
character*(8), external :: zmq_port
|
||||||
|
|
||||||
rc = f77_zmq_setsockopt(zmq_socket_push,ZMQ_LINGER,30000,4)
|
rc = f77_zmq_setsockopt(zmq_socket_push,ZMQ_LINGER,60000,4)
|
||||||
if (rc /= 0) then
|
if (rc /= 0) then
|
||||||
stop 'Unable to set ZMQ_LINGER on push socket'
|
stop 'Unable to set ZMQ_LINGER on push socket'
|
||||||
endif
|
endif
|
||||||
@ -1019,7 +1019,7 @@ subroutine end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
|
|||||||
character*(8), external :: zmq_port
|
character*(8), external :: zmq_port
|
||||||
integer :: rc
|
integer :: rc
|
||||||
|
|
||||||
rc = f77_zmq_setsockopt(zmq_to_qp_run_socket,ZMQ_LINGER,30000,4)
|
rc = f77_zmq_setsockopt(zmq_to_qp_run_socket,ZMQ_LINGER,60000,4)
|
||||||
if (rc /= 0) then
|
if (rc /= 0) then
|
||||||
stop 'Unable to set ZMQ_LINGER on zmq_to_qp_run_socket'
|
stop 'Unable to set ZMQ_LINGER on zmq_to_qp_run_socket'
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user