Skip to content

Commit

Permalink
Error stop
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Oct 25, 2023
1 parent 2cdff44 commit 9fa14db
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/rlda/uraninum_rlda.f90
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ program conv_rlda
err = abs(E_tot - E_tot_exact)
print '("E_tot=", F16.8, " E_tot_exact=", F16.8, " error:", ES10.2)', &
E_tot, E_tot_exact, err
if (err > eps) call error(err, eps)
if (err > eps) call stop_error("err > eps")
print *, "state E E_exact error occupancy"
do i = 1, size(ks_energies)
err = (ks_energies_exact(i) - ks_energies(i))
print "(I1, A, ' ', F16.8, F16.8, ES10.2, ' ', F6.3)", no(i), &
l_names(lo(i)), ks_energies(i), ks_energies_exact(i), err, fo(i)
if (err > eps) call error(err, eps)
if (err > eps) call stop_error("err > eps")
end do

contains
Expand All @@ -104,11 +104,4 @@ integer function get_N(Z, p) result(N)
close(u)
end function

subroutine error(err, eps)
real(dp), intent(in) :: err, eps
print "('Test failed: error = ', es10.2, ' > ', es10.2, ' specified.')", &
err, eps
call stop_error("Aborting...")
end subroutine

end program

0 comments on commit 9fa14db

Please sign in to comment.