anchor.diff:          use checking, only: check_allocate
           use real_lattice, only: create_next_nearest_orbs
           use system, only: set_spin_polarisation
  +        use report, only: wrapper_end_report
   
           integer(c_int) :: nresult
           type(c_ptr), value :: L
  
positive.code:         type(flu_state) :: lua_state
  
          type(sys_t), pointer :: sys
          integer :: opts, rng_seed, ncycles, nattempts
          logical :: fermi_temperature, all_spin_sectors
          real(p) :: beta
          character(19), parameter :: keys(2) = [character(19) :: 'sys', 'canonical_estimates']
  
          lua_state = flu_copyptr(L)
          call get_sys_t(lua_state, sys)
  
negative.code:         ! Return qmc_state to the user.
          call push_qmc_state(lua_state, qmc_state_out)
          nresult = 1
  
          call wrapper_end_report("FCIQMC calculation finished at", start_wall_time, start_cpu_time, .false.)
  
      end function lua_fciqmc
  
  