Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(maxerrors): limit the number of errors stored to maxerrors #221

Merged
merged 1 commit into from
Oct 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autotest/test_z03_nightly_build_largeexamples.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
exdir = None
for root, dirs, files in os.walk(home):
for d in dirs:
if d == fdir:
if d == fdir or d == fdir + '.git':
exdir = os.path.join(root, d)
break
if exdir is not None:
Expand Down
8 changes: 8 additions & 0 deletions doc/mf6io/mf6ivar/dfn/sim-nam.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ optional true
longname memory print option
description is a flag that controls printing of detailed memory manager usage to the end of the simulation list file. NONE means do not print detailed information. SUMMARY means print only the total memory for each simulation component. ALL means print information for each variable stored in the memory manager. NONE is default if MEMORY\_PRINT\_OPTION is not specified.

block options
name maxerrors
type integer
reader urword
optional true
longname maximum number of errors
description maximum number of errors that will be stored and printed.
default_value 1000


# --------------------- sim nam timing ---------------------
Expand Down
6 changes: 5 additions & 1 deletion src/SimulationCreate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module SimulationCreateModule
use ConstantsModule, only: LINELENGTH, LENMODELNAME, LENBIGLINE, DZERO
use SimVariablesModule, only: simfile, simlstfile, iout
use SimModule, only: ustop, store_error, count_errors, &
store_error_unit
store_error_unit, maxerrors
use InputOutputModule, only: getunit, urword, openfile
use ArrayHandlersModule, only: expandarray, ifind
use BaseModelModule, only: BaseModelType
Expand Down Expand Up @@ -240,6 +240,10 @@ subroutine options_create()
call parser%StoreErrorUnit()
call ustop()
endif
case ('MAXERRORS')
maxerrors = parser%GetInteger()
write(iout, '(4x, a, i0)') &
'MAXIMUM NUMBER OF ERRORS THAT WILL BE STORED IS ', maxerrors
case default
write(errmsg, '(4x,a,a)') &
'****ERROR. UNKNOWN SIMULATION OPTION: ', &
Expand Down
Loading