Skip to content

Commit

Permalink
Added some more test to parse.f90. Changed way errors are flagged in …
Browse files Browse the repository at this point in the history
…parse.f90
  • Loading branch information
lewisfish committed Oct 9, 2023
1 parent 1e96dd2 commit e74f005
Show file tree
Hide file tree
Showing 3 changed files with 320 additions and 104 deletions.
11 changes: 8 additions & 3 deletions src/kernelsMod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ subroutine setup(input_file, tev, dects, array, packet, spectrum, dict, distance
use vector_class, only : vector
! !external deps
use tev_mod, only : tevipc, tev_init
use tomlf, only : toml_table
use tomlf, only : toml_table, toml_error

!> Filename for toml settings to be used
character(*), intent(in) :: input_file
Expand All @@ -455,14 +455,19 @@ subroutine setup(input_file, tev, dects, array, packet, spectrum, dict, distance
! mpi/mp variables
integer :: id
real(kind=wp) :: chance, threshold

type(toml_error), allocatable :: error

chance = 1._wp/10._wp
threshold = 1e-6_wp

call directory()

dict = toml_table()
call parse_params("res/"//trim(input_file), packet, dects, spectrum, dict)
call parse_params("res/"//trim(input_file), packet, dects, spectrum, dict, error)
if(allocated(error))then
print*,error%message
stop 1
end if
allocate(image(state%grid%nxg,state%grid%nzg,1))

call display_settings(state, input_file, packet, "Pathlength")
Expand Down
Loading

0 comments on commit e74f005

Please sign in to comment.