You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namelist_split_by_line doesn't do any error checking to ensure that marbl_nl_buffer is a large enough array to contain the full contents of marbl_in; instead it silently truncates the file after marbl_in_line_cnt lines.
At the very least, we need an error check to abort if the full file is not copied into the array. A better option would be for marbl_nl_buffer to be allocatable, and namelist_split_by_line can allocate memory for it after determining how big it is.
The text was updated successfully, but these errors were encountered:
@klindsay28 pointed out that we had previously discussed reading in marbl_in line by line, and immediately broadcasting each line / calling put_setting() -- that would avoid this issue as well, plus it would reduce the memory footprint (at the cost off replacing one broadcast with several hundred during initialization).
namelist_split_by_line
doesn't do any error checking to ensure thatmarbl_nl_buffer
is a large enough array to contain the full contents ofmarbl_in
; instead it silently truncates the file aftermarbl_in_line_cnt
lines.At the very least, we need an error check to abort if the full file is not copied into the array. A better option would be for
marbl_nl_buffer
to be allocatable, andnamelist_split_by_line
can allocate memory for it after determining how big it is.The text was updated successfully, but these errors were encountered: