anchor.diff:          use report, only: environment_report
   
           type(logging_t), intent(in) :: logging_info
  -
  -        write (logging_info%calc_unit, '(1X,"HANDE QMC Calculation Log File")')
  -        write (logging_info%calc_unit,'()')
  -
  -        call environment_report(logging_info%calc_unit)
  +        integer :: iunit
  +
  +        iunit = logging_info%calc_unit
  +
  +        write (iunit, '(1X,"HANDE QMC Calculation Log File")')
  +        write (iunit,'()')
  +
  +        call environment_report(iunit)
   
           select case (calc_type)
           case(fciqmc_calc)
  -            write (logging_info%calc_unit, '(1X,"Calculation type: FCIQMC")')
  +            write (iunit, '(1X,"Calculation type: FCIQMC")')
           case(ccmc_calc)
  -            write (logging_info%calc_unit, '(1X,"Calculation type: CCMC")')
  +            write (iunit, '(1X,"Calculation type: CCMC")')
           end select
   
  -        write (logging_info%calc_unit, '(1X,"Verbosity Settings:")')
  -        write (logging_info%calc_unit, '(1X,10X,"Write Calculation Values:",2X,L1)') &
  +        write (iunit, '(1X,"Verbosity Settings:")')
  +        write (iunit, '(1X,10X,"Write Calculation Values:",2X,L1)') &
                           logging_info%write_highlevel_values
   
  -        write (logging_info%calc_unit,'()')
  -
  -        write (logging_info%calc_unit,'("#")', advance='no')
  +        write (iunit,'()')
  +
  +        write (iunit,'("#")', advance='no')
           select case (calc_type)
           case(fciqmc_calc)
  -            call write_column_title(logging_info%calc_unit, "iter", int_val=.true., justify=1, sep=',')
  -            call write_column_title(logging_info%calc_unit, "# spawn events", int_val=.true., justify=1, sep=',')
  -            call write_column_title(logging_info%calc_unit, "# death particles", int_val=.true., justify=1, sep=',')
  -            call write_column_title(logging_info%calc_unit, "# attempts", int_val=.true., justify=1, sep=',')
  -            write (logging_info%calc_unit,'()')
  +            call write_column_title(iunit, "iter", int_val=.true., justify=1, sep=',')
  +            call write_column_title(iunit, "# spawn events", int_val=.true., justify=1, sep=',')
  +            call write_column_title(iunit, "# death particles", int_val=.true., justify=1, sep=',')
  +            call write_column_title(iunit, "# attempts", int_val=.true., justify=1, sep=',')
  +            write (iunit,'()')
           case(ccmc_calc)
  -            call write_column_title(logging_info%calc_unit, "iter", int_val=.true., justify=1, sep=',')
  -            call write_column_title(logging_info%calc_unit, "# spawn events", int_val=.true., justify=1, sep=',')
  -            call write_column_title(logging_info%calc_unit, "# death particles", int_val=.true., justify=1, sep=',')
  -            call write_column_title(logging_info%calc_unit, "# attempts", int_val=.true., justify=1, sep=',')
  -            call write_column_title(logging_info%calc_unit, "# D0 select", int_val=.true., justify=1, sep=',')
  -            call write_column_title(logging_info%calc_unit, "# stochastic", int_val=.true., justify=1, sep=',')
  -            call write_column_title(logging_info%calc_unit, "# single excit", int_val=.true., justify=1, sep=',')
  -            write (logging_info%calc_unit,'()')
  +            call write_column_title(iunit, "iter", int_val=.true., justify=1, sep=',')
  +            call write_column_title(iunit, "# spawn events", int_val=.true., justify=1, sep=',')
  +            call write_column_title(iunit, "# death particles", int_val=.true., justify=1, sep=',')
  +            call write_column_title(iunit, "# attempts", int_val=.true., justify=1, sep=',')
  +            call write_column_title(iunit, "# D0 select", int_val=.true., justify=1, sep=',')
  +            call write_column_title(iunit, "# stochastic", int_val=.true., justify=1, sep=',')
  +            call write_column_title(iunit, "# single excit", int_val=.true., justify=1, sep=',')
  +            write (iunit,'()')
           end select
   
       end subroutine write_logging_calc_header
  
positive.code:         integer(int_p), intent(in) :: ndeath_tot
          integer(int_64), intent(in) :: nattempts
          type(logging_t), intent(in) :: logging_info
  
          if (logging_info%write_logging .and. logging_info%write_highlevel_values) then
              write (logging_info%calc_unit,'(1X)', advance='no')
              call write_qmc_var(logging_info%calc_unit, iter, sep=',')
              call write_qmc_var(logging_info%calc_unit, nspawn_events, sep=',')
              call write_qmc_var(logging_info%calc_unit, ndeath_tot, sep=',')
              call write_qmc_var(logging_info%calc_unit, nattempts, sep=',')
              write (logging_info%calc_unit,'()')
          end if
  
      end subroutine write_logging_calc_fciqmc
  
negative.code: 
          type(logging_t), intent(in) :: logging_info
  
          integer :: iunit
  
          iunit = logging_info%death_unit
  
          write (iunit, '(1X,"HANDE QMC Death Log File")')
          write (iunit, '()')
  
          call environment_report(iunit)
  
          select case (calc_type)
          case(fciqmc_calc)
              write (iunit, '(1X,"Calculation type: FCIQMC")')
          case(ccmc_calc)
              write (iunit, '(1X,"Calculation type: CCMC")')
          end select
  
          write (iunit, '(1X,"Verbosity Settings:")')
          write (iunit, '(1X,10X,"Write Successful Deaths:",2X,L1)') &
                          logging_info%write_successful_death
          write (iunit, '(1X,10X,"Write Failed Deaths:",2X,L1)') &
                          logging_info%write_failed_death
  
          write (iunit,'()')
  
      end subroutine write_logging_death_preamble
  
  