anchor.diff:    integer, intent(in)            :: size_energy
     double precision, intent(out)  :: energy(size_energy)
     integer                        :: rc
  +  integer*8                      :: rc8
     character*(256)                :: msg
   
     write(msg,*) 'put_psi ', worker_id, N_states, N_det, psi_det_size, n_det_generators, n_det_selectors
   
  -  rc = f77_zmq_send(zmq_to_qp_run_socket,trim(msg),len(trim(msg)),ZMQ_SNDMORE)
  -  if (rc /= len(trim(msg))) then
  -    print *, 'f77_zmq_send(zmq_to_qp_run_socket,trim(msg),len(trim(msg)),ZMQ_SNDMORE)'
  +  rc8 = f77_zmq_send8(zmq_to_qp_run_socket,trim(msg),len(trim(msg)),ZMQ_SNDMORE)
  +  if (rc8 /= len(trim(msg))) then
  +    print *, 'f77_zmq_send8(zmq_to_qp_run_socket,trim(msg),len(trim(msg)),ZMQ_SNDMORE)'
       stop 'error'
     endif
   
  -  rc = f77_zmq_send(zmq_to_qp_run_socket,psi_det,N_int*2*N_det*bit_kind,ZMQ_SNDMORE)
  -  if (rc /= N_int*2*N_det*bit_kind) then
  -    print *, 'f77_zmq_send(zmq_to_qp_run_socket,psi_det,N_int*2*N_det*bit_kind,ZMQ_SNDMORE)'
  +  rc8 = f77_zmq_send8(zmq_to_qp_run_socket,psi_det,N_int*2*N_det*bit_kind,ZMQ_SNDMORE)
  +  if (rc8 /= N_int*2_8*N_det*bit_kind) then
  +    print *, 'f77_zmq_send8(zmq_to_qp_run_socket,psi_det,N_int*2*N_det*bit_kind,ZMQ_SNDMORE)'
       stop 'error'
     endif
   
  -  rc = f77_zmq_send(zmq_to_qp_run_socket,psi_coef,psi_det_size*N_states*8,ZMQ_SNDMORE)
  -  if (rc /= psi_det_size*N_states*8) then
  -    print *, 'f77_zmq_send(zmq_to_qp_run_socket,psi_coef,psi_det_size*N_states*8,ZMQ_SNDMORE)'
  +  rc8 = f77_zmq_send8(zmq_to_qp_run_socket,psi_coef,psi_det_size*N_states*8,ZMQ_SNDMORE)
  +  if (rc8 /= psi_det_size*N_states*8_8) then
  +    print *, 'f77_zmq_send8(zmq_to_qp_run_socket,psi_coef,psi_det_size*N_states*8,ZMQ_SNDMORE)'
       stop 'error'
     endif
   
  
positive.code:   psi_det_size = psi_det_size_read
    TOUCH psi_det_size N_det N_states
  
    rc = f77_zmq_recv(zmq_to_qp_run_socket,psi_det,N_int*2*N_det*bit_kind,0)
    if (rc /= N_int*2*N_det*bit_kind) then
      print *, 'f77_zmq_recv(zmq_to_qp_run_socket,psi_det,N_int*2*N_det*bit_kind,ZMQ_SNDMORE)'
      stop 'error'
    endif
  
    rc = f77_zmq_recv(zmq_to_qp_run_socket,psi_coef,psi_det_size*N_states*8,0)
    if (rc /= psi_det_size*N_states*8) then
      print *, '77_zmq_recv(zmq_to_qp_run_socket,psi_coef,psi_det_size*N_states*8,ZMQ_SNDMORE)'
      stop 'error'
    endif
    TOUCH psi_det psi_coef
  
negative.code:   integer, intent(in)            :: size_energy
    double precision, intent(out)  :: energy(size_energy)
    integer                        :: rc
    integer*8                      :: rc8
    character*(64)                 :: msg
  
    write(msg,*) 'get_psi ', worker_id
  