subroutine output_exact_spectrum() use util_mod, only: get_free_unit integer :: i, temp_unit temp_unit = get_free_unit() open(temp_unit, file='EIGENVALUES', status='replace') write(temp_unit, '(1x,a12)') "Total energy" do i = 1, ndets_ed write(temp_unit, '(1x,i7,5x,f15.10)') i, eigv_ed(i) end do close(temp_unit) end subroutine output_exact_spectrum